You should have received a 1099-R for your withdrawal from your retirement plan. You and your custodian should have formally agreed to a "hardship" withdrawal before you made the withdrawal. The TurboTax FAQ below explains about hardship withdrawal from a 401K. Taking an early withdrawal most often incurs a 10% penalty. Hopefully you'll find the information you need in the FAQ linked below.
https://ttlc.intuit.com/questions/1901285-can-i-make-a-hardship-withdrawal-from-my-401-k
The FAQ below explains the allowable exceptions:
https://ttlc.intuit.com/questions/3701254-what-are-the-exceptions-to-the-penalty-for-an-early-withdr...
*** I am NOT a tax expert. I am a seasoned TurboTax user, and volunteer to provide assistance to TT users. Nothing I post is to be considered TAX ADVICE; I bear no legal liability for responses.***