Retirement tax questions

Unfortunately, taking a 401(k) distribution, to avoid foreclosure does not qualify for the hardship exemption to avoid the 10% penalty.

However if your dad was over 59 1/2 on December 31, 2016, or separated from his job after age 55, the 10% penalty can be avoided.

See https://ttlc.intuit.com/questions/3263721-what-s-the-penalty-on-a-401-k-hardship-withdrawal