You can transfer the money from 401k to IRA to Roth IRA then withdraw it after five years. You have to pay income tax during the IRA to Roth IRA conversion, but if you're retiring early your tax bracket is likely very low. Similarly, you'll be in the 0% bracket for long term capital gains.