Sadly, he's perfectly entitled to do this.
I have been in this situation. Looking for a home, find something - we said we were looking for somewhere to live for years, landlord said great, they want someone for years!
less than a year later - booted.
Sadly, the only thing that matters is the contract. doesn't matter what they say to you.
What we did was go to the council and present as statutorily homeless. They checked with the landord that we'd not done anything wrong (eg not paid rent, or been a pest or anything) and we stayed in the home until something came up. The council always tell you to not move out, or they say you've made yourself homeless! They make you wait it out and the landlord has to go to court and all that.
If you can rent privately again - do that. Find somewhere else and move. There's nothing you can do to make him change his mind. He's allowed to do this, as long as he doesn't break the contract you and he signed.
I know. It's shit. But there isn't anything you can do. He wants it back. It's his. He's adhered to the terms of the contract.
But has he given proper notice? written? Cos I'm not sure but I don't think phoning you counts!