There are two extensive geneologies that obliterate your argument. Please go away.
Actually the NT places the character through all the harlots of the Bible (once again why it's called the Harlot church).
One of those harlots was a Canaanite woman (non Jew).
=epic failed argument.
Matthew mentions four sinful harlot women of the bible conveniently and coincidentally in the Joseph genealogy:
1) (Genesis 38:12-19) Tamar who was the one who disguised herself as a harlot to seduce her father-in-law Judah.
2) (Joshua 2:1) Rahab who was a harlot living in the city of Jericho. And note wasn’t even of Jewish lineage, she was a Canaanite. The creators of the legend/image icon in trying to create his lineage and plagiarizing the OT goofed this one big time.
3) (Ruth 3:1-14) Ruth who was the one through her mother-in-law Naomi's request, came secretly to where Boaz was sleeping and spent the night with him. Later Ruth and Boaz were married.
4) (2 Samuel 11:2-5) Bathsheba was the controversial one who became pregnant by King David while she was still married to Uriah.