It’s important to emphasize that any money withdrawn from your 401(k) under the new rules is a real-deal “loan”. In other words, whatever you withdrawal has to be replaced by the end of the three year period. Otherwise it will be treated like any other pre-retirement withdrawal. I.e., you’ll need to pay income taxes on that money AND the early withdrawal penalty. You’re basically promising that in three years you’ll HAVE the money to pay it back. And if you don’t, you’ll still need to have the money to pay what could be substantial taxes and penalties.
Seems obvious, but I’ve already encountered two people who somehow didn’t get the memo that if they take money from their 401k under these new rules they actually do have to pay that money back.
In most cases utilizing cash in a 401k should only be a last-resort measure when you’re strapped and you’ve exhausted every other financial resource available. And as the other poster said you’re also diminishing future earnings every time you borrow money from a 401k. Even a small $20k withdrawal can end up costing you thousands in lost future earnings.
Leave your 401k alone unless it comes down to something like “Either borrow from my 401k or default on the mortgage payment.”