Let's see if I decipher this right.
The buffer and recoil spring were protruding from the receiver extension (buffer tube) into the lower, because the buffer retainer pin and it's spring came loose, which also jammed up your bolt/carrier.
Sound about right?
Likely the cause of the buffer retaining pin and spring coming out is that the receiver extention (buffer tube) was not screwed in enough to retain the pin.
Since you found the recoil spring to be a longer one than the replacement you bought, it's possible that at one time your rifle had a full length stock, buffer and spring originally. Someone changed the stock and buffer, but used the old spring and failed to screw the extension in far enough to retain the pin.
Maybe I'm off base, but sight unseen, and from the description you gave, this seems like a likely scenario to me.
From my Armchair Gunsmith Position
Lonny