Deductions & credits

There is no exception to the 10% early distribution penalty for a distribution from a 401(k) to pay education expenses.

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