A Queens senior citizen who shot dead a man who tried to rob him will spend four years in prison after admitting to toting an unlicensed revolver — as his lawyer ripped the city’s “draconian” gun laws.

Charles Foehner, 67, pleaded guilty to one count of criminal weapons possession Thursday in a deal to end his case more than two years after he fatally shot would-be thief Cody Gonzalez, who charged at him near his Kew Gardens home.

The Queens District Attorney’s Office chose not to prosecute Foehner, a retired doorman, for Gonzalez’s killing after he told cops that he’d defended himself from a mugger who lunged at him late at night holding what looked like a knife — but which turned out to be a pen.

But prosecutors slapped Foehner with a slew of weapons raps for the unlicensed handgun

See Full Page