There is not an exception for taking funds from a 401K for education.
Also if not retirement age there is an early withdrawal penalty.
Exceptions to 401(k) Withdrawal Penalties
That said, there are several exceptions to the 10 percent early distribution penalty that are intended to alleviate some of the financial loss in certain situations. Under the following circumstances, 401(k) withdrawals made before you reach age 59 ½ are exempt from the additional penalty:
- You die, and the account is paid to your beneficiary
- You become disabled
- You terminate employment and are at least 55-years-old
- You withdraw an amount less than is allowable as a medical expense deduction
- You begin substantially equal periodic payments (see Rule 72(t))
- Your withdrawal is related to a qualified domestic relations order