There are creatures, such as the hunting shark, which has a swim speed of 40 feet and a "normal / walking" speed of 0 feet; His most powerful attack is 5 feet. Does this mean that you could (somehow) drag this creature to the ground and then stab it with a range weapon?
For me this is just a disconnection (although I know that 5e is not simulationist) since a creature with only a "walking / normal" speed can swim through the water, but a creature with only a swimming speed cannot walk on land. .
If you want a creature that can survive more reasonably on land, there is the dolphin, which can hold its breath for 20 minutes, and the ixitxachitl, which can breathe even on land.
Can a creature with only one swimming speed move even on land?