Agreed. Peter was told that in advance by Jesus, but he still had to be convinced that gentiles could be saved.
9 ¶ On the morrow, as they went on their journey, and drew nigh unto the city, Peter went up upon the housetop to pray about the sixth hour: 10 And he became very hungry, and would have eaten: but while they made ready, he fell into a trance, 11 And saw heaven opened, and a certain vessel descending unto him, as it had been a great sheet knit at the four corners, and let down to the earth: 12 Wherein were all manner of fourfooted beasts of the earth, and wild beasts, and creeping things, and fowls of the air. 13 And there came a voice to him, Rise, Peter; kill, and eat. 14 But Peter said, Not so, Lord; for I have never eaten any thing that is common or unclean. 15 And the voice spake unto him again the second time, What God hath cleansed, that call not thou common. 16 This was done thrice: and the vessel was received up again into heaven. 17 Now while Peter doubted in himself what this vision which he had seen should mean, behold, the men which were sent from Cornelius had made enquiry for Simon’s house, and stood before the gate, 18 And called, and asked whether Simon, which was surnamed Peter, were lodged there. 19 ¶ While Peter thought on the vision, the Spirit said unto him, Behold, three men seek thee. 20 Arise therefore, and get thee down, and go with them, doubting nothing: for I have sent them. 21 Then Peter went down to the men which were sent unto him from Cornelius; and said, Behold, I am he whom ye seek: what is the cause wherefore ye are come? 22 And they said, Cornelius the centurion, a just man, and one that feareth God, and of good report among all the nation of the Jews, was warned from God by an holy angel to send for thee into his house, and to hear words of thee. 23 Then called he them in, and lodged them. And on the morrow Peter went away with them, and certain brethren from Joppa accompanied him. 24 And the morrow after they entered into Caesarea.
But Peter was speaking to Jews. He didn't believe that it could also apply to gentiles. He had to be convinced, and he was.
34 ¶ Then Peter opened his mouth, and said, Of a truth I perceive that God is no respecter of persons: 35 But in every nation he that feareth him, and worketh righteousness, is accepted with him. 36 The word which God sent unto the children of Israel, preaching peace by Jesus Christ: (he is Lord of all:) 37 That word, I say, ye know, which was published throughout all Judaea, and began from Galilee, after the baptism which John preached; 38 How God anointed Jesus of Nazareth with the Holy Ghost and with power: who went about doing good, and healing all that were oppressed of the devil; for God was with him. 39 And we are witnesses of all things which he did both in the land of the Jews, and in Jerusalem; whom they slew and hanged on a tree: 40 Him God raised up the third day, and shewed him openly; 41 Not to all the people, but unto witnesses chosen before of God, even to us, who did eat and drink with him after he rose from the dead. 42 And he commanded us to preach unto the people, and to testify that it is he which was ordained of God to be the Judge of quick and dead. 43 To him give all the prophets witness, that through his name whosoever believeth in him shall receive remission of sins. 44 ¶ While Peter yet spake these words, the Holy Ghost fell on all them which heard the word. 45 And they of the circumcision which believed were astonished, as many as came with Peter, because that on the Gentiles also was poured out the gift of the Holy Ghost. 46 For they heard them speak with tongues, and magnify God. Then answered Peter, 47 Can any man forbid water, that these should not be baptized, which have received the Holy Ghost as well as we? 48 And he commanded them to be baptized in the name of the Lord. Then prayed they him to tarry certain days. There was only, ever, one means of salvation from Adam till Christ returns.. That is faith in Christ.