Retirement tax questions

You had to be age 55 at time of separation from service, and higher education expenses do not qualify for a 10% penalty exception either.  However, you can roll the 401(k) into an IRA, and then take a distribution from that for that without penalty.  But income taxes will still be due. See:

Retirement Topics Tax on Early Distributions | Internal Revenue Service (irs.gov)