Unless there is something eg SEN then you need to support the teacher and kindly insist. If you get into a conflict with the teacher, and let her avoid her fears all the time, she will end up a more anxious child who does not feel like she has a strength to face difficult feelings.
Help her with this by (1) gently but firmly insisting and (2) at the same time supporting.
Tell her (1) she is not alone, lots of children really hate school swimming too. Lots of other kids will be dreading school swimming today, just like her.
(2) Tell her that it is fine not to like it, and that you can understand why she doesn't.
(3) but that in life we do have to do things we don't like sometimes and you would not be a good mum if you let her not do it.
(4) and that she will be OK if she does something she doesn't like for an hour or so - it will come to and end and life will go on as before. I think some children have really low tolerance and anxiety for doing things which are dissonant with their preferences. It can be helpful to really talk through with her that although it feels horrible, nothing bad will happen if you do something you don't like. You just don't like it, you put up with it while it is going on, and then you feel pleased after that you did it.
(5) that if she can face this challenge and join in with all the other kids, in the end she will be glad she did and pleased. But that things that are worth doing often feel very difficult at first.
Speaking from experience, the real challenge I think when you have got a very anxious child - who puts all their anxiety into you and makes you feel awful - is to not become punitive and say dismissive stuff "well you've got to suck it up" or "well that's life". She does need to do it, but she needs support. I remember with my son who didn't want to do x-country or various other things having to really work at this as the temptation can be just to snap.
Good luck.