Education expenses is not an exception to penalty tax on a withdrawal of a 401(k) plan.
You may be eligible for an education credit if the expenses paid were for yourself or your dependent.