4-4.5% is an interest rate where you're really not wrong either way. If your income is low enough to deduct the student loan interest, that brings the effective interest rate lower, which could be a point in favor of 401(k) contributions. Another point in favor of the 401(k) is that if your income rises you can't go back later to put money toward your 2016 401(k) limit, but you can put more money toward your loans at that time if you wish.
But as I said, both choices are good. Investing is likely to come out a bit ahead, but it might not, and the difference probably won't be huge either way.