How to re-download Minecraft on another computer after purchasing it?

I bought Minecraft about 2 years ago, but now I'm on another computer. I have my Mojang account and it says I have to re-buy it. I also got an email with a 4-digit code that says:

Here's the verification code you need to continue with your purchase of Minecraft:

But when I enter it (or click the link) I get this:

Verification failed. Make sure that your verification code and email address are correct.

Any help would be appreciated.

Log in