If you’re a competitive swimmer, you have much more muscle than most girls your age, and it’s going to weigh more. Ignore the scale. You don’t weigh too much. Listen to your coach (as long as they’re not a jerk) and fuel your body so it can grow and perform. Obviously a single 24hr fast isn’t going to do anything to you long-term, and plenty of religions would let kids your age participate in fasting, but your framing of this as a weight loss strategy worries me for you. It doesn’t matter what those other girls weigh. It matters that you’re healthy.
As noted above, not recommended under age 18. That being said, you will not lose muscle mass on a single 24hr fast, as your body’s natural HGH levels increase while fasting and will protect from this occurrence.
But hey, you’re a competitive athlete and that should be celebrated and hopefully you’re proud of that. You weigh more cos you have more muscle mass than others. You are almost certainly in significantly better general health than them.