KABUL, AFGHANISTAN, JAN. 20 -- Afghan President Najibullah said today that his government is non-Marxist and is committed to nonalignment after the withdrawal of the Soviet troops helping his Army fight Moslem guerrillas.

He also told a news conference for visiting foreign journalists that his administration would accept aid from any country willing to give it.

Najibullah appeared relaxed and jovial as he said he looks forward to the end of the nine-year-long war that has devastated his country.

He said "1988 should be the last year of the limited contingent of Soviet troops in Afghanistan," using the phrase applied by Moscow to its force, estimated by western experts at 115,000 to 120,000.

Najibullah repeatedly emphasized his government's commitment to nonalignment and democracy. "We have several times proclaimed, and I still want to state, that the government of Afghanistan at this moment is not a Marxist-Leninist government," he said.

Asked if his ruling People's Democratic Party would accept an election victory even by a group opposed to the leftist policies of the past eight years, he replied: "Concerning the role of elections, we have always said we would abide by the decisions of the majority."

He said Afghanistan wants to strengthen friendly relations with its neighbors, with other Moslem states and all other countries.

"We shall always be a loyal member of the Nonaligned Movement," he said, pledging that Afghanistan would abide by the humanitarian principles of the United Nations and the Islamic Conference Organization.

Asked about economic reconstruction after the war, Najibullah said, referring to Kabul's close links with Moscow: "Historic trade relations have in the past six or seven years undergone a qualitative change."

But Afghanistan would welcome assistance from all other countries that wish to help, he added.

Najibullah declined to say how many Soviet troops are in the country, but said their number is "very much less than the presence of American and other forces in Germany."

On the outskirts of Kabul as he spoke, a seemingly endless Soviet military convoy rumbled into the city, snarling traffic on the snowy streets.

Najibullah, a former security police chief, also declined to give the strength of Afghanistan's own armed forces, which some western analysts put as low as 30,000. But he said the civilian militia, police and other self-defense forces total 137,000.

"I can give a full assurance that the Afghan armed forces are capable of controlling the country and providing for the peaceful life of the people," he said.

Najibullah said there is no need for a U.N. peace-keeping force after a Soviet pullout, although the world body had a role to play in bringing about peace talks.

Negotiations between Afghanistan and Pakistan through U.N. mediation are due to resume in Geneva at the end of next month, and Moscow and Kabul have expressed optimism that a final agreement will be concluded. The United States, which with the Soviet Union would be a guarantor of such a settlement, has been less optimistic.