Withdrawals from a 401k are considered taxable income. However, if you are under 59 1/2, the IRS will charge an additional early withdrawal penalty for taking a withdrawal early. The penalty can be waived if you meet certain criteria. Per the IRS, "plans may allow a hardship distribution to pay for your, your spouse’s, your dependents’ or your primary plan beneficiary’s":
medical expenses,
funeral expenses, or
tuition and related educational expenses
When entering into TurboTax if you entered this as a hardship distribution, the early withdrawal penalty was removed but the withdrawal amount is still subject to income tax.
Withdrawals from a pre-tax 401k are always taxable. In most cases, you also pay a 10% penalty if you are under age 59-1/2. There are a few exceptions to the penalty, but the only one that might apply to you is you can exclude $1000 from the penalty for a personal emergency. But if you withdrew more than $1000, you pay the penalty on the rest and tax on all of it.
Even though your plan may allow a hardship withdrawal, it is still taxable.
If you have left the company, you can withdraw for any reason (you do not have to prove a hardship) but you still pay income tax and penalties.