Here and there in pre-modern European history, you hear reports about male sexual assault more often than you do modern. For example, the Scandinavian Vikings would use it against their enemies as a form of humiliation, and in Ancient Rome, it was abhorred, as was female and child rape of Roman citizens.
But as you travel towards, and during the modern era, the general discourse of it seems to... drop off. Why? Did the sexual assault disappear? Or was it suppressed through some means and not discussed?
Where are you getting the information about vikings from? None of the sagas I can think of mention rape being used as a coercive tool by Scandinavians.
What changed?
Armies became more organised and more professional as time wore on. While there still were mercenaries, they were generally recruited into existing regimental structures aligned with the national army of the European nations rather than being recruited with their own officers and structure whole.
Armies started to rely much less on plunder. The train of solders' wives, children, whores, thieves, gamblers, booze-sellers, cookers, cleaners etc (often one person could take many if not all of these roles) behind the army started to be replaced by professional supply services. Quartermasters' corps were established, and all food and other things to be plundered were to be organised by them. Plundering without orders and keeping plunder to yourself became a crime that could and frequently would be punished by death.
Provosts were introduced and their ability to enforce the laws and rules increased with time, which meant that the ability to rape and get away with it diminished.
Stricter control, stricter discipline and therefore fewer opportunities to rape is msotly the answer to your question.
Then again, voluntary relations was not uncommon. The Swedish horse and foot guards, stationed in Stockholm, had to ban soldiers from certain fashionable streets as it was a too common occurance of late 19th century wealthy men to pay the soldiers large sums for sex.
The army claimed to have eradicated the problem several times, which shows that it continued to exist.