My question involves landlord-tenant law in the State of: NJ

Renting a room in NJ for 2 months. Went looked at the room and said will decide later that evening. In the evening called the lanldord and said want to take the room ready to sign the lease and will pay the security deposit. Met the landlord next morning with only 500$ cash (not the full deposit) since that's what the ATM allowed (didnt have personal checks). Signed a sublease/roommate contract and paid 500$ as security deposit and said i will work with my previous landlord for move-out date and call you in the evening for rest of security deposit

Changed my mind after speaking to previous landlord who offered a better deal to stay on. Informed him that i no longer want the place.Now want my other 500$ security deposit back. The landlord says its not refundable since the room was held by me and he had to relist the room to rent out again. Can he withhold the securoty deposit for me changing my mind same day when it was not paid in full ?

What are my options to recover the money ?