Retirement tax questions

The loans were not "paid off" ... technically you defaulted on them so the unpaid distribution is taxable ... on the 1099-R you will see a code 1 in box 7 and unless you can put in the early distribution amount back into the 401K or an IRA by the filing deadline of the tax return there is no way to avoid the taxes or the penalty if you are under the age of 59.5.