I am having my party run through a Dwarven held tunnel followed by a Human Capital but I was wondering what sort of military ranks would the officers they receive missions off hold.
Medieval military ranks would "cross-cut" with noble ranks, at least for humans. (You can use whatever you want for dwarves.)
The capital would have a king, who is theoretically in charge of the entire military force there, but in practice there would be a general working for him. Said general might be a landed noble (eg General Duke Wellington) or, if the king is smarter and more powerful, an unlanded noble who owes everything to the king (General Sir Patrick Stewart). In fact, there's likely a secondary military force for when the king and his army are away - this leader might be the castellan, or some similar title.
In addition, there's powerful landed nobles who spend no time in their lands (those lands are run by their stewards or deputies) but spend all their time at the royal court, scheming and trying to get jobs like Minister of X, Minister of Y, etc. Some of these jobs would instead go to high-ranking priests, and since this is a fantasy setting, one or more jobs might be held by wizards. (There's probably a Court Mage, and the "Court Priest" might be the king's confessor, if the religion has that practice.) Each of those powerful nobles (especially the landed ones) has a "bodyguard" as large as possible, including probably secret "bodyguards", who are likely mercenaries, spies, agents provocateur and what have you - in short, each powerful noble has a secret army. If the king is weak, these armies might be more powerful than his!
A landed noble might feel compelled to give positions to family members, and if he has multiple companies, one company might be led by his smart uncle, another by his idiot cousin, another by a professional warlord who isn't a landed noble, etc. The heroes could figure out a lot of the plot just by which officer is approaching them.
I think you can't really follow military ranks as such because they were ad hoc and less important than the noble titles granted. In essence, these nobles could invent their own titles. Captain Sir Patrick Stewart might call himself the "Red Captain of Fed's Dale" or something like that, but him being subordinate to the Lord Admiral Sejanus of the Bay is probably more important than his actual title.