North Tonawanda man heading to prison on gun charge