The one caveat about swimming is you have to have had formal lessons or else it is very difficult. Swimming like martial arts is all technique. I recommend lessons to everyone, I think learning to swim is essential. If I have not been swimming regularly for the last 20 years, I do not think I would be able to train as intensively in wrestling as I do now at the age of 50. With that said, If you are young and actively competing in a combat sport, and you are not a super high level swimmer, you have to run.
Honestly, the whole treading water as hard and as long as I can thing worked pretty well for me. It made me extremely tired and I say that as a guy who has been working out since I was a young kid and is pretty advanced on the rings, which I think most people would agree are pretty taxing. And of course, grappling and wrestling are pretty taxing as well. Point being, I know what it is to tax my muscles and I felt plenty taxed, in fact, more taxed than I often felt, treading water.
I once saw an interview with Jon Jones, he does a lot of swimming and he said that he is a terrible swimmer but the worse your technique the better the work out is.
As a mid-40's guy who's been trying to get more efficient at swimming since late teens/early 20's (but could only tread water/dog paddle until then), agree it's something you need to have trained formally as a kid, or otherwise have to devote more time than available to most working adults. IME the caveat of getting a "great workout" by exerting yourself in water with terrible form is that it can't compare to the workout you could get by pushing it during a run, or indeed in the water if you had more efficient form.
When I used to wear a HR monitor and was anal about data, I could maintain 175 bpm at will during a run and that's my anaerobic threshold. At will I could up the pace to 190's for a few seconds, multiple times over 10K distance. If I wanted to redline it, I could touch 200 bpm without worrying about injuring myself. But I'm a naturally efficient runner and have done it for years without injuries.
In swimming, the highest HR I could maintain was around 145, and that's doing laps with shitty freestyle stroke. In a max sprint, the highest I could hit by going white belt spaz was around 165 bpm before struggling not to swallow water and on the verge of drowning. By contrast, my buddies who took swimming lessons as kids/were lifeguards, etc. could comfortably do laps and regulate pace and HR at will, like I can during a run.
Both swimming and running are heavily dependent on form, it's just more evident in swimming because fewer people do it well. Like all sport-specific movements, you have to be relaxed through the motion with clean technique. Most injuries I've seen in swimming or running were attributable to the athlete being stiff and/or having poor stroke/stride technique. If you have an inefficient running stride, running long distances without proper recovery will lead to repetitive use injuries in knees and hips. That said, I think just about everyone has the potential to safely run distances up to around 5K, but I'm sure there are exceptions.