If it were up to me, I'd give the ability to tag children (yes, children) as either military or civilian.
I know it's an extreme viewpoint, but this isn't something that anyone would force you to do. It would be a choice to make, with benefits, and sometimes strong temptations, but also with serious penalties.
Now that doesn't mean the children themselves would ever have to fight. Children would still do whatever they wanted. It simply means that you'd choose which broad area the child would be groomed for, once that child reaches adulthood.
I don't understand why Urist McSoldier should have an unhappy thought about mining for a living, or about being a soldier instead of a miner. Both are highly dangerous trades, and these are dwarfs, living on the frontier. If they aren't atleast willing to grit their teeth and occasionally fight for survival, they shouldn't have left the Mountainhome.
And they (the relatively rational ones, anyway, and primarily the ones that show up before you get a working economy) should have some sense of that.
What I *do* understand is that, from the point of the middle ages back, with Sparta being a well-known starting point, it was fairly typical for there to be a military elite that would be holistically trained in the deadly arts (including various social skills, making that portion of the game suddenly make a little bit of sense), basically from birth.
As uncomfortable as it may make some of us, it's what happened, and it makes sense in terms of the nature of the game. By "tagging" such children for the military (or "warrior caste", whatever you want to call it), you'd both benefit from their lifelong training, and be handicapped by the economic and social burdens that come with them.
In a sense, they'd all be Nobles. They'd have special needs and elite social status, as well as military status. You'd have to plan for that, and also plan for years of training (they might even take years longer simply to reach "adulthood" than your civilian children, representing more closely an active apprentice-program), along with all the maintenance such a warrior caste would require.
Switching those warrior caste dwarfs over to permanent civilian status, or possibly giving a civilian identical status and rights, depending on the particular societal structure in place, could (and should) cause immense social upheaval, starting with unhappy thoughts and quite possibly ending with rebellion, or even a military coup.
Think "The Last Samurai".