Lake Tahoe is as far away as the ocean, if not more so. Folsom Lake and Lake Natoma are both dam-created lakes near Sacramento--I know swimming at Folsom is popular but not sure about Natoma (fishing, boating and a lot of other water sports are popular.) There are also the rivers, the American and the Sacramento, that run through Sacramento--both have swimming spots.
There is also a lake at the old Rancho Seco nuclear power plant:
SMUD.org | English | About SMUD | Rancho Seco Recreational Area
It was originally an emergency backup water supply for the nuclear plant, long since shut down (the area now has both natural gas and solar generating plants instead of nuclear.)