Sentencing Truant High School Students to Military Service?

The Louisiana House of Representatives will consider a measure that would apparently permit judges to do just that.

Especially in the absence of a national draft, how exactly would this bill be legal?

A judge hearing a truancy case against a high school student could require the teen to enroll in the Louisiana National Guard or other branch of military service, under an amended bill that cleared the House Education Committee.

Outside of a national draft imposed by the federal government, where power is rooted in an interest of preservation of the nation in time of conflict, how can a state judge compel someone to service in one of the nation's armed forces, much less a minor?  That seems like it might be a violation of the Eighth Amendment. (ADDED: I originally thought it might offend the 13th Amendment as well - but as the text states: "Neither slavery nor involuntary servitude, except as a punishment for crime whereof the party shall have been duly convicted").

Apparently felons were sentenced to military service during World War II (during a draft), for example, in Illinois.

Military service might be a good prescription to turn the life of a troubled youth around - but giving a judge the power to compel a high school student to serve seems unorthodox and troubling.

If anyone finds a decent link to the text that passed, please send it along.