All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
We have already clarified in Fatwa 90940 that there is no harm for a woman to practise sport in a gym provided some religious requirements are met, among which is that marriageable men should not be present.
Since you mentioned that some marriageable men are present, then it is not permissible for you to go to such a gymnasium. The need of decreasing weight is not a necessity for which committing sins could be forgiven, especially that the benefit which you want to achieve could be fulfilled without going to such a place, for instance by practising some kinds of sports at home, using some medicines or herbs and the like, and these things are known to the people who are specialized in the field. So it is better for you and for your religion to refrain from attending such gyms.
Allaah Knows best.