You'd be wise to go on a consumer rights forum really...
But it sounds like breach of contract on their part. You put down £1,000 on the assumption that you'd get a certain car, of a certain quality, at certain price. Through their error you cannot have the car any more, so they have failed to fulfill their side of the contract.
You'd very likely be entitled to a full refund of the deposit. The problem is, you *might* have to take them to court as quite a few car places are quite adverse towards handing back £1,000.
They almost certainly WON'T hand you a new car for the second-hand price, as they'd be losing money in such a transaction. Giving you back the deposit would be preferable compared to that...
There *may* be scope for "consequential loss" as well, but that's a bit trickier.