Of course you can retire whenever you want. But 401k plans generally permit withdrawal without penalty only after you have reached 59 1/2 years of age. Prior to that there will be a penalty for withdrawals. By age 70 1/2, you are required start withdrawing money.