they are different because cannot means you're saying that you're not gonna able to go swimming (later), But could not means you're saying that you didn't get a chance to go swimming (earlier). Cannot is present tense. Could not is past tense.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.