Taking money out of a 401k to buy a house is not an exception to the penalty for an early withdrawal like it could be with a regular IRA.