You didn't bother to share with us where you are, but you ma have difficulty getting your deposit back. dj will tell you to go to small claims court, but it is not universally true that you are entitled to your deposit back.
What you have going for you is that there is 4 months until you were supposed to move in which allows a fair amount of time to try to straighten everything out. But wherever you are, the landlord may be able to keep the deposit, or some of it, and be uncooperative about re-renting the premises.
I suggest that you discuss the matter with your landlord personally and see what you can work out. Be sure to follow that discussion with a formal notice that you will not be moving in. Assist the landlord in every way to find a new tenant and remember that he can charge you for all of his expense and trouble to do that. Also remember that you are the party that caused the problem, not him, so I would not make any demands on him, only try to discuss, politely and professionally, the problems and possible solutions.