squad training helps.
I just started a new fort and the first year has only just ended and i have a legendary hammerdwarf.
To be fair, i did check to choose the best of my starting 7 dwarves to see which was the best military pair, put them in the same group. I also find hammerers get more "sparring" (what you want to go up in skill very very quickly) than swordsdwarves.
You can set it so they train in pairs, i find this is less effective (perhaps easier to do though, seeing 10 militaries of 2 dwarves can be annoying) than splitting them up into separate militaries.
I also keep a pair of dwarves near my exit in leather only, they are there to slaughter thieves, one is "exceedingly agile" so due to lack of heavy armor will literally leg it out and generally catch thieves with whom are ~30 tiles away from the dwarf and map edge. It also causes much amusement when they actually get into the fort and get "found" by these guys, they get 2 squares away before dying, or less.
some screenshots to show some good tips for finding good military dwarves and training schedules:
First dwarf therapist, to show high military skills % = fast learner (1 year = legendary +3!!) not even a "berserker" or "legion" or whatever the other caste is on masterwork.
Next is the training schedule you start with (to access, press "s" to go to squad menu, select a squad (i.e "a" to select first squad) then "s" for schedules, this is the screen, default is 10 dwarves as seen:
Instead we want to remove that order (or change it) and add 5 of the following orders:
This then lets you just chuck them all in the same military, i very much suggest you keep each squad with the same weapons, some 1 squad for swords, a different one for axes etc.
very much agree with loud whispers also, make sure that ranged enemies have huge difficulty in firing on your dwarves, fight the fight in your base, if you have dwarves running around on the surface and you wish to save them by sending the squad out, make sure you hugely outnumber them and are well trained.
accomplished is NOT enough, because dodging/armor user/shield user will be low (perhaps "adequate") these need to be adept, proficient at the least, to block most of the ranged hits.
I have managed WITHOUT marksdwarves, but this does usually involve fair losses of 2-5 dwarves whom were poorly trained (i.e fodder to give much better chances of my main legendary dwarves to kill the enemy)
hope that helps