Hi,
Did you purchase the key from your previous computer separately, or did it come with Windows already activated?
Because if you have an OEM key, it's non-transferable; it's tied to the hardware. This also applies to Windows 7 and 8.1 licenses, which have been deactivated.
Thank you.