The President is both the head of state and head of government of the United States of America, and Commander-in-Chief of the armed forces. Under Article II of the Constitution, the President is responsible for the execution and enforcement of the laws created by Congress.
You can join some branches of the United States military at the age of 38 years but not others. The Army, Navy, Air Force, Marine Corps and Coast Guard each has its own minimum and maximum age requirements for enlistees, including for new recruits in the active-duty ranks, the Reserves and the National Guard.
Across the armed forces, the minimum age allowed for enlistment is 17 (with parental consent) and 18 (without parental consent). The maximum age for enlistment for someone who has never served in the military before varies by branch; for the Army it's 35, for the Navy it's 34, for the Air Force it's 39 and for the Marines it's 28.