Aside from the fact that the military can’t find people in modern America who want that “privilege” of serving, the military already has to make a decision on the validity of your marriage, just as they did in 1780.
If everybody gets to legally define it themselves, from Mosques to atheists, then the feds would have to recognize them, as would eventually all the other states and court systems.
I guess if the state, fed included neither punish nor reward marriage, then there would be nothing to recognize.
If the military wanted to set different standards, via the UCMJ, I supposed it could.
BTW. I found this on answerbag.
The first marriage license was issued in Shawnee, Kansas to John D. Skidmore and Arabella Z. Rice. Their marriage was performed on February 24, 1856 and the first marriage license was recorded on April 18, 1856.
I would guess census data would show marriages before this without benefit of state license.