For most of the war, the minimum enlistment age in the North was legally held at 18 for soldiers and 16 for musicians, although younger men could enlist at the permission of their parents until 1862. In the South, the age limit for soldiers stayed at 18 until 1864 when it was legally dropped to 17.
https://www.bing.com/search?q=confederate+soldier+enlistment+age+limits&FORM=AWRE