My company deducted my salary to waive my resignation period

I worked for the organisation in gurugram(delhi ncr) for almost 2 years. Due to some personal problems my wife was facing in canada i had decided to move to canada. In September 2019 i resigned from my position after discussing my personal issues for which i have to move asap and asked them to waive off my resignation period. At the first my director told me he will adjust my resignation period with my leaves and i will get my salary. After i came to canada in october 2019 I received my full and final settlement in which all my salary has beend deducted for resignation period which i only served for 20 days instead of 2 months. I was shocked as my director told me he will do something and the second thing was that in the past my company waived off full resignation periods for 3 female employees but why were the terms are different at my time. So i wrote email to my HR team abroad, first they didn’t respond to my emails for a month, then i asked for my relieving letter. After receiving it on the very same email i asked them to answer why they differentiate in employees and they simply replied they followed terms of employement. I don’t what to do next. Do i have any rights regarding this, i feel they discriminated here. Please help.