I mean I don't know the specifics, i'm sure if you actually asked T-Mobile if it voids the warranty they would say yes, all i'm saying is if you take the phone to use the Jump program they don't even look at the bootloader, most of those guys don't even know how to get into Download Mode let alone check it.
I would say No I don't think you would have a problem, but you never know, the decision is up to you.
Doing this the way a factory refurb does it that will wipe out Knox and flash counters and custom ROMs and all that jazz. They have equipment that will do what Odin can't. So they don't care.
If you do get a T Mobile store rep who does check the bootloader and makes a big deal out of the Knox flag, just take your phone to another T Mobile store. Or come back to that one the next day and talk to someone else. 9 out of 10 store clerks are not phone nerds like us. They are people with minimal phone training just working a retail sales job. If you get get the 1 phone nerd, another store will have 4 guys who don't even know what a bootloader is.
Once T Mobile takes the phone from you and processes the exchange, they cannot come back later and claim that it doesn't qualify. If they did you can just say you have no idea what they are talking about and their rep inspected prior to the exchange so something must have happened after it left your possession.