The gun started life as a rifle, yes?
You can't make a pistol out of a rifle, without the $200 federal tax stamp. If you do, it's a felony.
If the barrel is 16" minimum, AND the overall length is 26" minimum, you're OK.
You got very lucky if it met the minimum length.