Yes and you have much to learn. For one thing, there are many ways to access your 401k early!
If you defer taxes now and withdrawal small amounts later to control your tax bracket, even the 10% penalty can be a bargain.
A Roth IRA will allow you to remove your contributions at any time.
You could also use set it and forget it funds, rather than trading, so that there isn't much in capital gains until you want to use the money.