Vacating the rented house

I and my family are staying in Bengaluru in a rented house since 1 year and 3 months. My owner has given me a notice of 2 months on 19 January 2024 to vacate his house on or before 18 March 2024. I have found a suitable house and informed the owner that I would be vacating his house on 20 Feb. 2024 and asked him to return my security deposit at the time of leaving., after deducting the rent upto 20 Feb. and also legal deduction if any. The owner said that he would deduct the rent uptil 18 March 2024, even if I would leave early I. e, 20 Feb. and other trivial expenses and return the remaining money after expiry of the notice. Since it was owner's notice to leave the house on or before 18 March 2024, I started looking out for a rented house, which, I got it earlier than the notice period. As per his notice, it is on or before 18 March. As such, it is not for the owner to deduct till 18 Mach, which, I feel is illegal. I request you to give me a solution to this problem. Thank you very much.