Absolutely no question, Glock 21.
Lighter than the M9, 1 or 2 less rounds, can work in sandy environments, and that fat (and textured, on the Gen 4) grip really agrees with gloves, in my experience.
Though I don't know a single person in the military that ever had to use their sidearm (not saying it doesn't happen, I'm sure plenty of folks have been saved by the Beretta), if I had a choice, I'd still want what I'm most comfortable with. And surprise surprise, it's the G21.