This is by far the best way for a beginner to get faster.
"Best" is subjective, but I'd say the
quickest way for a beginner to get faster is structured training plan if the person has a coach or some training knowledge. Anecdotally I've seen much more improvement from people using this path than I have from people who do the group ride thing. Certainly that was the case for me. And I still do very few group rides, the ones that I do are mostly to reduce boredom and when I'm working on TT and bridging efforts.
I also avoid a lot of group rides because in a lot of the ones I've seen people ride like dangerous idiots.
But doing a structured plan requires a level of commitment that's helped along by having some concrete goals, because it's not "fun" per se. I'm not getting that from the OP, though if he's coaching swimming his knowledge level might be higher than most newbies.
My advice at this point would be to go do some races, figure out what you like, what you're strengths and weaknesses are, and if you want to seriously pursue it, get back to us. I'm not a "one size fits all" training advocate and you need to be able to self assess before jumping into any specifics.