Retirement tax questions

Sorry. Even though they have a similar purpose, IRAs and 401(k) are controlled by different tax laws and follow different rules.  The homebuyer exception does not apply to a 401(k).