My landlord is not ready to give the deposit amount

Hi, I was shifted in a flat on July 2019. We are 3 girls in a 3 bhk flat. I got a job opportunity in Bangalore I have to joined next month. I had informed to owner and also told him i will look for the replacement..He did not said anything at that time. It's been 10 days I am still searching for replacement. Also, my flatmate are not ready to help me . I asked to owner to return my deposit when i will leave the flat. He said, "this is not a PG, I had taken you all as a family., if you all leaving the flat that is the different story. but if individually you people are leaving that's not my fault. I had spent a lot of money on that. If you need the deposit, check for replacement else i cant do anything. You will not get anything from my end." I am still looking for my replacement, but please let me know if i did not get any replacement and owner refuse to give the deposit. Is it correct? or we can take action against him? I have to shift in other state also i need my money ...please advice ...what best I can do? Thanks in advance.