All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
You should not have prostrated for forgetfulness in our view because the places of articulation of the two letters are very close to each other and this kind of mistake is very insignificant.
However, since you have prostrated, then this does not invalidate your prayer. Similarly, this does not invalidate the prayer of the people praying behind you for not following you in the prostration that you prostrated after the completion of the prayer even if this prostration of forgetfulness was legitimate for you.
Allah Knows best.