Hello, you can actually withdrawal early from a 401k for the purpose of buying a home. They consider a home purchase to be a hardship.
You can also take a loan out of your 401k but the loan payment may count in your debt to income ratio depending on how much money you have vested in your 401k.
The process takes a little while so it just depends on when you plan on buying.
I mostly handle the lower NY area and I'm available almost 24/7.
There are a lot of mortgage programs available.
If you would like help with this or have any questions you are welcome to contact me.