Until their death. Desertion by a serviceman during wartime, but especially during battle, is considered to be one of the worst crimes a soldier can commit, regardless of their justifications or reasons for why they did it.
If criminal behavior on the part of a commanding officer prompted the desertion, or the serviceperson had a documented mental illness which prevented them from being responsible for their actions, lenience may be shown andadministrative justice, not punitive punishment, will likely occur.
from an article at veteranstoday.com:
"Military officials maintain that those who deserted the service are liable under law, no matter how unpopular a war was. "We actively investigate all cases of desertion," says Fred Hall, a spokesman for the Naval Personnel Command. "For each of the active deserters we have on our rolls — 1,190 as of 31 Jan. '06 — there is a federal warrant out for their arrest."
Witness the cases recently where a Korean war deserter (Charles Robert Jenkins) and a Vietnam era deserter(Ernest Johnson) were found and punished with fines, jail or probation time and given "other than honorable" discharges, were denied benefits given to other vets, etc.
The Germans and Russians simply shot their deserters (some 50,000 all told) during WWII. We shot one of ours (Eddie Slovik) during WWII and hung a few during WWI. The British shot many in WWI, right on the battlefield, with no court martial or military review of any kind.
I am not agreeing with these practices, but I am saying this is what happened then.
If someone deserted during WWII and now wants to turn themselves in they can start here:
Get a civilian lawyer who specializes in Military Justice and can accompny the serviceman before a military court martial, if held. Have that lawyer contact the NCIS on the serviceperson's behalf, stating that the deserter has turned themselves in.