The distribution is included in gross income; there is no exclusion in the law for using retirement account funds for this purpose. However, because you are over age 59½, there is no 10% early distribution penalty. Younger participants taking 401(k) withdrawals for home-buying costs are subject to penalty. The exemption from the 10% penalty only applies to withdrawals from IRAs for first-time homebuyers, and only up to $10,000.
A revenue ruling is the Commissioner’s “official interpretation of the interpretation of the law” and generally is binding on revenue agents and other IRS officials. Taxpayers generally may rely on published revenue rulings in determining the tax treatment of their own transactions that arise out of similar facts and circumstances.