Yes, the only way you would not have been penalized would have been to roll your 401k over into an IRA or a ROTH IRA, or another 401k in your new employment. For future, if your 401K has low annual fees and you are comfortable with your investment options and growth, you can hold your account active, it's not mandatory to roll over or withdraw it when leaving a job.