You're saying every population everything on earth could solve their freshwater problem with desalination if only they had cheap energy? No other issues here besides lack of energy?
You also need seawater. But infinite energy lets you move fresh water a long distance. You could deliver it to the middle of the country from the coast. Or from other countries.
Try thinking of this another way to help you understand. How does nature get most of us surface freshwater to begin with? Energy from the sun heats ocean water which causes evaporation into the atmosphere (aka "natural desalinization") and then wind patterns in the atmosphere (also generated by energy from the sun) cause clouds to move over land where water vapor eventually condenses and falls as precipitation, filling lakes and rivers.
So the equation is basically energy input from the sun creates freshwater from salt water and transports it over land. Humans can, and have, replicated this process artificially, the limiting factor just being the cost of energy.