No, it's not illegal. The only thing you can't do if you're under 21 is purchase a handgun, or handgun ammunition. I remember being turned down one time when trying to buy .22 ammo because I wasn't 21 yet. It didn't help to tell them that it was for a rifle, not a handgun.
But I used to carry both a 22 handgun and a 357 before I was 21.