That is very bad advice Brown...IMO!
You can borrow against the 401K to purchase a primary residence not pay off a home equity loan unless you can prove to them its an emergency. Use it for the down payment and let the title company deal with the proceeds on the sale of your existing home minus the liens against it.