The distribution could be mitigated by rolling over the same amount of the distribution into an IRA within the regular 60-day limit. The new provision in TCJA allows an extension of this time, up to the due date of the tax return for the year of the distribution. This applies to 401k, 403b, and 457 plans equally, but we’ll just call them 401k loan distributions for brevity.
For example, Willard has a loan with a balance of $10,000 against his 401k plan. He’s been paying it back regularly, per the plan rules. In 2018 he leaves the job, but he doesn’t have enough money to pay back the loan right away. So his old job’s 401k administrator considers this a distribution from the plan, and since Willard is 50 years old, there are no exceptions to apply. This will result in a 1099R at the end of the tax year from the 401k administrator, indicating a fully-taxable distribution with no exceptions applied.
In the olden days, Willard could still avoid the tax and 10% penalty on the distribution if he could somehow come up with $10,000 within 60 days and roll that money into an IRA. In the new world of TCJA, Willard doesn’t have to come up with the money within 60 days: he has until April 15, 2019 to come up with $10,000 and roll that money into an IRA. This will avoid all tax and penalty on the rolled-over distribution.
Keep in mind that this only applies to 401k loan distributions that occur as a result of the employee terminating his employment or the company terminating the retirement plan. If the plan loan distribution occurs because the employee has not kept up with his payments against the loan, this is still considered a distribution subject to ordinary income tax and the 10% penalty if applicable. This type of distribution has no way to avoid the tax and penalty by a rollover.