The “kingdom” in this scripture represents those who become true followers of Jesus.
“Keys” are a symbol of power to open. Jesus gave the Apostle Peter the authority to first open (or preach) the message and work of the gospel to the Jews, and later to the Gentiles. At Pentecost, Peter proclaimed the gospel to the Jews. Acts 2:14 records that when “Peter stood up with the eleven,” he took the initiative. Peter opened the gospel invitation to the Jews, and the other apostles followed him. There he used one key.
More than three years later, he used the other key to open the message of the kingdom of heaven to the Gentiles. The Lord sent Peter a vision in Acts 10:11-16. The next day, Peter went to the gentile Cornelius and preached the gospel to him (Acts 10:28-48). Thus, Cornelius became the first Gentile to accept the Lord Jesus Christ as his Savior and to be begotten of the Holy Spirit. The Apostle Peter long ago used the keys referred to in this scripture. There will be no occasion ever to use them again. Those who reach heaven will not pass through literal doors.