For melee weapons to have any advantage of ranged weapons, they have a number of disadvantages to overcome. Also, for the heck of it, I'm also going to compare to Star Wars and show how they get around all of them.
- Stopping power. Real world firearms are already plenty effective at killing or injuring people. You either have to have melee weapons that KO on the first swing and be able to deal with everyone within reach, or you need some sort of defense against guns that doesn't apply to swords. Even then, grenades do the same damn thing (and at throwing range rather than melee), so this is a minimum consideration, not a sufficient criteria. Star Wars deals with this by lightsabers slicing through any non-lightsaber defense and having blaster-wielding stormtroopers
be stupidly inaccurate. RPGs get away with it by giving everyone a boat load of hit points
- Opportunity cost. If you can field a dozen soldiers with rifles for the same amount of resources and training as one guy with a super sword, the sheer number of gun-toting soldiers you can put out will probably drown out Mr. Stabby's potential contributions. Quantity has a quality all on its own. Star Wars gets away with this by making it irrelevant; in the prequels (blargh) the jedi knights are already trained from peacetime, but even then the solution to the droid army is to clone a metric ton of soldiers, not to train more jedi.
- Range. If battles start at long distances, guns can get off a lot of shots before swords can even start swinging. Throw in difficult terrain or fortifications, and it gets even worse. Jedi in Star Wars basically ignore all that with hax force mobility enhancements and the fact that they're immune to blasters.
- Exclusivity. Unless the stopping power argument is because guns are worthless, if melee defensive techniques can be used while shooting people from a distance with guns, you might as well take the best of both worlds and just have elites that are immune to bullets while spraying their own. Star Wars definitely has this exclusivity thing going for it, since deflecting blaster bolts is explicitly tied to using a lightsaber. Even then, dual wielding and shooting a blaster with one hand while using a saber in the other like a shield would still be viable if it weren't for all the other factors keeping blasters from having any advantage at all for a jedi.
It would make sense for urban combat, where distances are short, cover is plentiful, and line of sight is not a given. If they can shrug off incoming fire while closing the shorter distances involved or advancing through cover (and then move again once they've recovered maneuvers), then yeah, your elite swordy squads can work it.
Unless they've got some maneuvers that are basically "immune to ranged attacks forever" like jedis are with their lightsabers, melee combatants will have trouble cutting it on an open battlefield with modern ranges. Firearms are plenty deadly at large distances, so unless something changes that, the increased offensive benefits of a souped up melee fighter don't actually mean much when enemy soldiers can safely expect to get more than a few rounds off before they can close. Stopping only a few attacks at a time before needing to recover maneuvers/recharge shields/whatever doesn't quite cut it when you'd have to charge across even half a football field against modern rates of fire.
If you want to experiment, just play Halo. It's not a bad simulator for this sort of thing, at least to get some basic impressions. You've got an extremely damaging melee weapon, a variety of firearms, multiple environments and combat ranges, temporary improved defenses against attack (can shrug off a few hits, but not too many, then needs time to recharge, just like maneuver-based defenses), and a singular elite against a greater number of mook soldiers. Compare gameplay focused primarily on using that beam sword thingy (which even helps you close the distance with a speedy charge in some of the games) vs. a mix of less-damaging ranged weapons.