Keep going. Show up early so he's the first one there and can get a few seconds of one on one time with the instructor. They might be able to gain his trust and help him muster the bravery to get in. They're trained to deal with this and can best do it one on one with the parent staying out of it and before the rest of the class needs them too. Take him to the side of the pool, deliver him to the instructor and take a seat.
Plan a reward for after the lesson if he does get in the water. A treat from the pool vending machine where he can put in the money and push the buttons to get the treat he picks, or a mystery prize you bring in your purse like a bouncy ball or yo-yo - something small that he likes. Let him know you have a treat planned ONLY if he gets in the water and tries.
Don't give up or you might be building a routine of him refusing to participate in not just this group activity but others as well.
If he decides to stand on the side of the pool for 6 more lessons that's his choice. Don't give him eye contact or dote over him during the time he should be swimming. Watch the kids that are swimming and looked happy and content yourself. Get excited to see the other kids trying and learning. He'll see that he's wasting his own time and not getting your attention. I think he'll get in. If you spend the whole time at the pool trying to persuade him he'll take that attention.
The reward is really two fold - swim and you'll watch and clap and smile etc... AND he gets a tangible reward after.
There is no punishment. If he doesn't get in he doesn't get your attention or the planned reward at the end.
Both of my kids respond great to the mystery prize. They just want to know what it is. If they don't do what asked of them they don't get the prize and they NEVER know what it was. The suspense is just what they need. I've given sea shells, polished minerals/rocks etc... They're always happy when they get to see what it is, and have it. It doesn't have to be fancy.
Happy swimming.