Tax Year Prior to 2020: 401k to HSA

My previous employer sent me a notice that my 401k was due to be paid out to me via check at the end of December. But that means I lose 20% in taxes, and another 10% as a penalty [I think] because I'm only 30. 

 

I'd like to rollover the 401k into my HSA, so I can pay my medical bills. Both accounts are pretax money so it seems logical to me, but I can't find any articles supporting this move. 

 

Is it possible, legal, and advisable to rollover my 401k into an HSA?

 

note: I do have a Roth IRA but as that's post-tax money, and if I rolled the 401k into that [as far as I can tell] I'd still have to pay all those taxes and penalties, and I just want to switch from one pre-tax account to another. Thank you.