When Jesus said these things, He was not saying this specifically to Gentiles, but to those who did not repent and believe in the message of Christ; this is most evident in Acts where the apostles receive some Gentiles but shake the dust against others who didn't repent. He was in effect saying those unrepentant towns were no better than pagans.
Well, for one, Matthew 10:14
48 And when the Gentiles heard this, they began rejoicing and glorifying the word of the Lord, and as many as were appointed to eternal life believed. 49 And the word of the Lord was spreading throughout the whole region. 50 But the Jews incited the devout women of high standing and the leading men of the city, stirred up persecution against Paul and Barnabas, and drove them out of their district. 51 But they shook off the dust from their feet against them and went to Iconium. 52 And the disciples were filled with joy and with the Holy Spirit. -Acts 12:-48-51
Jesus Sends Out the Seventy-Two
10 After this the Lord appointed seventy-two[
a] others and sent them on ahead of him, two by two, into every town and place where he himself was about to go. 2 And he said to them, “The harvest is plentiful, but the laborers are few. Therefore pray earnestly to the Lord of the harvest to send out laborers into his harvest. 3 Go your way; behold, I am sending you out as lambs in the midst of wolves. 4 Carry no moneybag, no knapsack, no sandals, and greet no one on the road. 5 Whatever house you enter, first say, ‘Peace be to this house!’ 6 And if a son of peace is there, your peace will rest upon him. But if not, it will return to you. 7 And remain in the same house, eating and drinking what they provide, for the laborer deserves his wages. Do not go from house to house. 8 Whenever you enter a town and they receive you, eat what is set before you. 9 Heal the sick in it and say to them, ‘The kingdom of God has come near to you.’ 10 But whenever you enter a town and they do not receive you, go into its streets and say, 11 ‘
Even the dust of your town that clings to our feet we wipe off against you. Nevertheless know this, that the kingdom of God has come near.’ 12 I tell you, it will be more bearable on that day for Sodom than for that town. - Luke 10:10-12
Jesus Sends Out the Twelve Apostles
7 And he called the twelve and began to send them out two by two, and gave them authority over the unclean spirits. 8 He charged them to take nothing for their journey except a staff—no bread, no bag, no money in their belts— 9 but to wear sandals and not put on two tunics.[
a] 10 And he said to them, “Whenever you enter a house, stay there until you depart from there. 11 And if any place will not receive you and they will not listen to you, when you leave, shake off the
dust that is on your feet as a testimony against them.” 12 So they went out and proclaimed that people should repent. 13 And they cast out many demons and anointed with oil many who were sick and healed them. - Mark 6 :7-13