I’m terrified and I need advice..

So like I’ve been at public school for majority of my life but when we moved to another state I went into a charter which goes all the way from kindergarten too High school. But I didn’t want to stay for highschool years and decided to transfer but that’s besides the point. I hate water. I mean I’m deadly terrified I freeze up half the time and get super anxious which it never was this bad but when I was younger I lived in Georgia and we constantly went to the beach and I never showed much interest in water and mostly stayed on the sand building sand castles (even though I did go in sometimes) my mom pushed me and tried to get me too swim but I always panicked. I finally started feeling comfortable and I went under the water one day and I got super scared and I never learned how but my friends have tried to help me and i just can’t do it, I mean I knew a boy like 2 years older than me and we were playing Marco Polo in a pool and he had to literally grab me up because I went under. And then my other friend has tried to get me comfortable again after almost drowning twice which I was doing better and then my niece drowned and 4 days later I went to a friends house and they were like we could swim which was a sensitive topic at that moment and I just stood there frozen staring at their pool and panicking, too the point where I cant even look at pools or big amounts of water. But our new school for gym you have to do swimming and my moms told them they said we might be able to work something out but that’s a might and I’m terrified because I will literally either freeze up or walk out of the pool room.