+1 for TheOldestYoungMan.
Having taking a loan against my 401K to pay down debt, I recommend that strategy. You can borrow up to 50% of the balance of your 401K, and all interest payments go to YOU. In my case, it's a 4% interest loan to be paid back to myself over X years.
Also, when you do the math for the 'rent vs buy' decision, don't forget to factor in the hidden costs of home ownership:
Taxes, Insurance, Electricity, Gas, water/sewer, garbage.
I went from:
$1,721/month as a renter. ($1610 rent/heat/garbage) + $50 insurance + $20 electricity + $41 internet, to
$1,914/month as a homeowner. [$1,646 (mortgage, taxes, ins) + $28 electric + $10(average) gas + $150 water/sewer + $39 garbage + $41 internet].
My reasons to buy were all intangibles. The freedom to plant stuff, work on stuff in my garage, and have my son go to the best high school in the area (the biggest reason for the change) is worth the difference to me. I also gained the tax advantage of deductible mortgage interest, but I think the standard deduction was just as good, if not better. I will potentially go back to renting after my son graduates high school, and rent out the house as a source of income in FIRE.