@Alexander Johnosn There are really only a few ways to get your money out from a 401k plan before you reach the retirement age stated by your plan.
1) You leave the company, which creates a distributable event, allowing you to withdraw the money if you so choose, but you must pay a 10% tax penalty if you withdraw the money before age 59 1/2 PLUS normal taxes.
The next two options are ONLY viable if your 401k Plan allows it, some plans do and some don't, check with HR or read your Plan Document to find out if they are available.
2) 401k Loan - if your Plan allows, you can take a loan from your 401k up to a maximum of the lesser of a) 50% of your balance or b) $50,000. The benefit here is that typical fees for loans are $50-$100 (depending on your plan) and all the interest you pay on the loan is going straight back to your own 401k account, so you're basically just paying yourself interest. You also don't have to pay taxes on the loan, HOWEVER if you ever stop making payments or leave the company and take your money out of the plan then it becomes a distribution and you'll owe taxes on it if the loan isn't paid back.
3) Hardship distribution - some plans allow for hardship distributions, which are distributions for certain reasons (medical, eviction, etc.) and one of the allowed reason is for the purchase of a primary residence. However, if you aren't going to live there then this doesn't apply. It waives the 10% penalty fee, however you'll still have to pay normal taxes on the distribution.
Hope this info helps!