1. The water in the glass is fresh.

2. The water of the glass is fresh.
[which preposition should we use?]

3. He is swimming in the water.
4. He is swimming in the river.
5. He is swimming in the sea.
6. He is swimming in the lake.
7. He is swimming in water.

[Does #3 mean #4, 5, or 6? Shouldn't we use #7 in this case?]

Use 1, not 2.

3 - 6 are all fine.
4 - 6 are more specific than 3, but they're all correct.
7 would be used if you were going to explain that he was swimming in water, not in chocolate (or anything else!).