401K Withdrawel 2017

We took money out of my husbands 401K  I suddenly was separated from my job at the end of 2016 I'm 58 and he's 57 Can we avoid the penalty or does it have to be him that separated from his job?