Air Force 2nd Lt. John Gonzales, who deserted to Canada in 1968, will be allowed to resign rather than face a court-martial, the Air Force said yesterday.

Gonzales, arrested in Alaska in May, was one of five Air Force officers who deserted during the Vietnam war, according to Capt. Sherri Stetson-Mannix, an Air Force spokesman. Three had their resignations accepted after they turned themselves in under a clemency program offered by the Carter administration, she said, and one is still at large.

In 1977, Carter pardoned Vietnam-era draft evaders. That amnesty did not officially extend to deserters, although a forgiving attitude governed review of such cases, according to a Pentagon official. "I know of no change of policy on this matter," he added.

Gonzales, 36, was a graduate in anthropology of Florida State University who received an ROTC commission as a second lieutenant in 1967. To further his education, he was given one year's delay in reporting for duty, Stetson-Mannix said.

He deserted to Canada in 1968 rather than report to an Air Force base in Illinois. In Canada, he married a Dutch-born Canadian woman and became a naturalized Canadian citizen.

Gonzales learned to fly there and now is a bush pilot, his wife said in a phone interview. He passed through the United States last year en route to and in returning from Central America, where he took a plane for delivery, she said. He aslo visited Alaska last year without incident.

This year, on a flight to Alaska, he was arrested after a routine U.S. customs check. "Customs just punched his name into a computer, and it came back that he was wanted," said his wife, a cook at mineral exploration camps in Telegraph Creek, British Columbia, where the couple lives.

From an Army jail in Anchorage, Gonzales submitted his resignation soon after his arrest. It was quickly approved by military officers, Mrs. Gonzales said.