There's a chance you can go to a T-Mobile store and they can transfer.
Otherwise, it's some form of manual process on your part.
What I did with my mother (who went from a feature phone similar to your old device to an Android) is I took her phone home, logged into Google from the web and manually typed in all her contacts on my laptop because it had a full-size keyboard. I would like to think iTunes has a similar option in their interfaces?
Manage your T-Mobile account