Dear Sister,You are quite correct about the two Josephs in the genealogy of Jesus being different, but ...
1. Matthew's genealogy is that of Joseph (Mary's husband) - Joseph being the adopted "father" of Jesus would be 13th generation, and hence Jesus would be the 14 generation from Babylonian exile. Joseph (Mary's husband) descended from King David via King Solomon, but that royal line ( via Jeconiah) was cursed to not continue ruling at a later stage
2. Luke's genealogy is that of Mary and her father Heli. Whilst Joseph (Mary's husband) is mentioned Luke 3:23, he is not Heli's physical son - when the KJV uses a word in italics (see Luke 3 - "son" is used regularly in italics) it indicates that the word is not in the original text but was added to the translation for contextual reasons. Compare that to "begat" used in Matthew 1, which indicates physical descent. Heli (Mary's father) was descended from King David via Nathan (Solomon's brother)
Since the genealogies are different, and since the word "son" was added by translators in Luke 3, compared to "begat" which is not in KJV italics so it was literally a word used in the original text.
Why Joseph was called "of Heli" in Luke 3, could be a cultural way of referring to a father-in-law, and/or it could be that Heli had no sons, so Joseph also took on the role of Heli's "son".
in Jesus' Name,
Lester