Furnace operator is a decent militia-job, if you have the capability to melt down lots of items to generate the jobs. Haven't looked into how much the attribute boost there is per job. Engraver is also good (have your militia smooth out large sections of floors) since it boosts agility, and Kinesthetic and Spatial senses, which make your dwarves handier with weapons.
It's best though to just try to get your dwarves to be on full-time training with a lot of sparring. You can actually give multiple "train" orders in one schedule slot. In the schedules screen, Tab lets you switch between the schedule slots and the list of orders given for each slot. I've heard that a bunch of "Training, minimum 2" orders in each slot is a great way to produce lots of sparring, but have not personally tested this.
If you just want to boost their physical attributes though, Pump operator works (but is slow), or you can try pelting them with small non-lethal items (like seeds). It's also slow on a per plink basis, but you can dump a LOT of items on a dwarf. The "industrialized" form of this is to have a small 2x1 pit with two retracting bridges set on repeat to create an eternally shifting floor that flings items back and forth. Trains up armor-user real good and by the time they are Legendary, their physical stats will have received a +500 boost in almost all of their physical stats. It's a different kind of danger room.
If you're just planning on using your off-duty military like regular workers though, (rather than putting them through an exhaustive and non wealth-producing training regimen), then it really doesn't matter WHAT they do, because normal civilian tasks train up attributes about 100x too slow to be useful. The exception to this is Mining, because each square dug = 1 job, so your miners can easily be given hundreds of tasks to complete, and thus give meaningful boosts to their military stats. If the mining job equipment didn't conflict so horribly with soldier's equipment, then mining would be the ideal "idle military job".
However, since mining skill now only affects speed and not ore yields, there's no problem with drafting your tough veteran miners into the military and replacing them with noobs.
My fundamental point though is that there really isn't any good "Off-Duty task for the militia". If you're not going to embark on an intensive training program to boost their stats, then it doesn't really matter what task they do, because aside from hauling, there aren't very many jobs that are done on a truly large scale in a fort that will provide noticeable benefits in under a decade.