I remember one of the ridiculous laws from that time was that I couldn't buy a handgun from an FFL dealer because I wasn't 21, but it was perfectly legal for me to buy from a private citizen.
The age requirement (21) comes from Federal Law. IT applies only to FFL dealers, and became the law in 1968.
Being able to buy (at any age) from a private individual is a matter of individual state law. In general, NY laws are as strict, or stricter than Federal law.