I'll go slow so as not to lose you in the "twists"
Ben was told he was a clone, but that the real Peter had been released. The "Real" Peter turned out to be a clone, the "fake Peter, then calling himself Ben" turned out to have been the real Peter all along.
See, the Jackal had cloned Peter and wackiness ensued that almost got the Spider-Man books canceled due to loss of readership ultimately leading. Marvel considered using the "Ben Reilly" angle to replace Peter to increase fandom and while it drew a ton of attention, it got too complicated and lost fun and readers started dropping the series left and right.
So Marvel decided to reveal that Ben had been Peter all along and the Peter that died was just the clone.