Dolphins are marine mammals and compose about half of the 80 – 90 known species of cetacea recorded so far.
The other half is made up primarily of whales and a few species of porpoise.
Of the 40 + known dolphin species, most species are not known to live in freshwater environments, at least not for long periods of time.
Dolphins that are not considered freshwater dolphins may visit or travel through freshwater environments, but they ultimately return to their saltwater habitat.
A few dolphin species such as the amazon river dolphin, Ganges river dolphin, and Indus river dolphin are known to reside primarily/exclusively in freshwater rivers.
Still, as stated previously, most dolphins live in saltwater environments.
Part of the reason most dolphin species do not live in freshwater environments is that most of their prey live in saltwater.
Saltwater also contains certain healing properties, salts, and minerals that help clean out infections and assist dolphins in the healing of various cuts and wounds that may occur due to predators attacking them or injuries from sharp objects in the environment.
Freshwater environments may lack the healing properties necessary to assist dolphins quickly when recovering from various wounds and/or attacks.
Saltwater also allows dolphins to make much deeper dives which are sometimes necessary when hunting for large quantities of food or specific prey.
In fact, it would be challenging for dolphins to find large quantities of certain foods in freshwater environments, especially if large pods of dolphins were hunting together and needed to make sure each dolphin had a sufficient supply of food.
When their food migrates to a new location, some dolphin species can often be found migrating to new areas to maintain their food supply.
Species such as the amazon river dolphin are known to inhibit the shallow waters of the amazon river during the dry season.
Once rain season comes around and floods large parts of the amazon, it provides the dolphin with more opportunities to travel further and meet other dolphins and mates.
This traveling and migration period often lasts for several months while the opportunity to leave their local habitat exists.
Once the water begins to reside and the rainfall begins to taper down, these dolphins return to their natural habitats and wait for the next rainy season to leave their local rivers and travel out again.
In saltwater environments, dolphins may be more restricted and less likely to migrate than those in freshwater environments.
Some dolphins also prefer to have a lot of space to swim around, and in most cases, that space can only be found in the salty ocean.
To sum this up in one sentence freshwater is too shallow to dive in and/or support large pods of dolphins, lacks large supplies of specific foods which may be required by certain species of dolphins to survive, and is too small of an environment for most dolphins to roam around freely.