For a direct military response, where would you have them strike? A lot of ransomware is individual criminals working remotely. Would you have their houses destroyed from above? Their neighbors would not approve. Even when a country ignores their actions, they aren't hosting them in a location that can be targeted. If they did and someone attacked it, that would be an act of war. Since they don't, it would be an act of war and a war crime at the same time. Perhaps a bit extreme.
For a hacking response, I don't think there's anything preventing someone trying to hack the systems used by criminals. The authorities are unlikely to arrest someone for doing it, in large part because the criminals are unlikely to report the crime to them. Providing support for such privateering, on the other hand, would lead to similar complaints that the supporting government is also helping criminals.
I think some harsher responses are justified, but these ones are risky or unethical.