Two parties can contract to anything they want, but a court will not enforce terms that are grossly unjust to either side.
So, you are saying that the agreement was that if you stay for less than 1 year, then the rent is $2,000 per month, and if you stay for 1 year, then the rent is $1,800 per month? If this is correct, then it is different from what I understood, and I think this is valid.
In either situation, though, you are supposed to pay all the rent due, and then get the deposit returned to you.
That is what you are supposed to do, but many people don't do that - they just don't pay the rent for the last month or two, especially if there is reason to believe that the landlord is not going to return the deposit.
If you do decide to pay the rent for the last one or two months you are there, and the landlord does not return your deposit, you can take him to Small Claims
If I have fully answered your question, please click on the "ACCEPT" button, as per your agreement with "JUST ANSWER." If you need further information, please let me know.