This is a great question! Unfortunately, JOD lease phones cannot be transferred to new accounts. If you move your line to a new account, your JOD lease will remain on the current account. Depending on how far along you are into your JOD lease and how much you really want to move your line to another account, it might be worth it just taking the phone into a T-Mobile store to have the JOD lease ended. You are still responsible for the remainder of the 18 monthly lease payments but you would not have to pay the residual purchase price. Once you are on your own account, you can initiate a new JOD lease on another phone.
If you want to keep your current phone, you can opt to pay off the device in full which would be the remaining months payments of the 18 month lease as well as the residual purchase price.