Retirement tax questions

You have to be age 55 in or after the year of separation from the company that held the 401k to be exempt from the 10% early withdrawal penalty.

IRS Tax Topic 558 - https://www.irs.gov/taxtopics/tc558

The following additional exceptions apply only to distributions from a qualified retirement plan other than an IRA:

Distributions made to you after you separated from service with your employer if the separation occurred in or after the year you reached age 55