For tax collection, he wasn't opposed, if they were not stealing for personal gain. Matthew 17:24 and following for instructions to pay Roman taxes. Luke 19:8 for theft repayment by corrupt officials.
Numbers 31
> Now kill all the boys.
> And kill every woman who has slept with a man,
> but save for yourselves every girl who has never slept with a man.
Anyway, it's worth linking to the Wikipedia article which provides the background to that chapter[0] and pointing out that at the time of the events described in Numbers 31, it was the standard practice of nations to commit cultural genocide against their enemies (to prevent a continuing cycle of violence), by killing off their males and their widows, leaving only the unmarried to assimilate into the victorious society.
Less violently, it was common for men to defect to a foreign culture when taking a wife from that culture, which had been the case with Israelite men and Midianite women. It was that potential for cultural extinction (and literal extinction, as a deadly plague struck the Israelites after this) which lead to the war whose rules of engagement you quoted.
But that aside, if we're allowed to dismiss certain aspects of the bible because they are no longer culturally relevant, how do we decide which tenets should be followed at all?
To give just a couple of examples, there is the case of Pharaoh ordering the killing of all male children at the start of Exodus[0], and in Esther chapter 3 we see that the antagonist Haman's plan was "to destroy all the Jews who were throughout the whole kingdom of Ahasuerus".[1]
Anyway, I don't think Christians should dismiss aspects of the Bible that are culturally difficult, but there are principles for applying its contents to modern situations. The relevant principle here would be that the Ten Commandments are to be generally followed at all times, but God may choose to give specific instructions for specific situations which override those commandments. Reassuringly, it wasn't up to Moses to decide whether or not to attack the Midianites, as he was given that as a direct instruction, in his capacity as the political leader of the Israelites.
[0] https://www.biblegateway.com/passage/?search=Exodus%201&vers...
[1] https://www.biblegateway.com/passage/?search=Esther%203&vers...
The point is there's a ton of stuff in there that just never seemed to get mentioned when I used to go to church. I get the feeling people try really hard to ignore them.
So I make it a point to bring them up.