Retirement tax questions

What code is in box 7.    Did you default on the loan  and they took the money to pay it back?

If you repaid the loan with funds from the 401(k) before rolling over the remainder than the loan repayment would be fully taxable just as if you took the distribution in cash and then used that cash to pay the loan.  There is no way to avoid the tax (and early distribution penalty) on a distribution.   The amount rolled over would not be taxable.
**Disclaimer: This post is for discussion purposes only and is NOT tax advice. The author takes no responsibility for the accuracy of any information in this post.**