Are you currently a TMOBILE USA customer? If you were never a Tmobile customer they can't issue you an unlock code.
Here are the requirements to get a phone unlocked through Tmobile USA.
I'm a customer, Tmobile, my number is 908XXXXXXX,I could not register on the site to contact
*edited personal info - Marissa