Few things that you might try
1. maybe something is blocking FFXIV and it does not have access to internet! (check you antiviruss/firewall)
2. Contact store where you got this game, and request money back or to change to a valid one (after all if it say that registration code have been already registered, then it might be "pirated" code)
3. Contact square-enix for assistance (maybe a broken code r something)
Also make sure you enter code correctly (numbers, caps and thing like that, code might be case sensitive