Hi is your new iphone locked to some other network provider other than t-mobile .Then you must unlock it to use it on t-mobile .you can unlock it at
Mobile-unlocker.com here they help you unlock your iphone using remote unlocking method .They also provide step by step instruction about how to unlock iphone
1. Wait for us to send you an email saying your phone has been activated or remotely unlocked.
2. Install the latest version of iTunes.
3. Make sure your Apple iPhone 3GS phone software is updated to the latest version using the iTunes software.
4. Connect your Apple iPhone 3GS to iTunes with a NOT ACCEPTED SIM card.
5. Wait until iTunes detects your Apple iPhone 3GS.
6. Disconnect your Apple iPhone 3GS and reconnect it after 10 seconds.
7. Your Apple iPhone 3GS is now unlocked.