Presuming you mean an enlisted US soldier serving during the Vietnam War (1960-1970, approximately), then there are two answers:
Prior to the mass-introduction of US ground combat troops (i.e. the so-called "advisory" period of US involvement, roughly 1960-1965), the majority of soldiers were still volunteers, and many were professional career soliders. As such, enlisted would have an average age around 22, with NCOs averaging 27.
With the introduction of US ground forces for combat, the enlisted ranks were generally filled with draftees. Over 90% of all draftees were in the 18-20 range. By the time they were drafted and had undergone training, then deployed to Vietnam, the average age of a enlisted soldier was a bit over 20; the age of NCOs had also shifted downward, as many of the former volunteer force were promoted to fill new NCO positions, so the average NCO was now almost 25.
Thus, prior to 1965, the average age of an infantry platoon (25+ enlisted, 3-4 NCOs, and 1 junior lieutenant) would have been about 24. Post 1965, it would have been 21 or perhaps 22.
The average Allied soldier was about 20.
From looking at the casualties, they seem to mirror the age of the average US serviceman.
Average= 25 oldest= 98 youngest= 13
Average Age of A Soldier in Vietnam
From 17-68 ish
The average age of enlisted Gulf War soldiers was around 24 years old.
The average is 23, now the youngests were 17, and oldests 40.
The average age of soldiers in the American Revolution was 18 years old. There were some soldiers that lied about their age so that that could participate in battles.
The average age of a soldier in the Civil War was approximately 26 years old. However, soldiers could range in age from as young as 13 to as old as their 60s.
Spartan soldier had to marry at the age of 30
The average age of a German soldier during World War 1 varied, but it was generally around 20-25 years old. Younger soldiers, often in their late teens, also served. Older soldiers in their 30s and 40s could also be found, especially in leadership roles.
Hitler was more than twice the age of the average Wermacht Army soldier. He died at age 56.