What carrier do you want to use the phone with? If, say, you want to use it with AT&T, just go in and buy an AT&T phone. It will be unlocked. Just swap out the SIM card in the phone with the one you already have if you don't want to activate the provided SIM card for some reason.
I thought I could do that but s/AT&T/TMobile. 3 TMobile retail stores have refused to unlock my phone. It's still unopened in a box. I paid full retail price for it and have never had a TMobile account, which is where they get confused.
Did you buy your phone from Apple or from TMobile? If you bought it from Apple, it should be unlocked already. You should be able to drop in your SIM and go.
In fact, I did this two years ago with the 6 Plus. I bought a T-Mobile phone from Apple because they were unlocked (at the time the others weren't, even if purchased directly from Apple) and used it with my AT&T SIM.