The gates of hell/hades didn’t prevail, the righteous dead there were freed by Jesus Christ.
Christ's statement was made to Peter regarding the Church. You are referring to those freed from Sheol.