You haven’t actually read what I quoted from St John of Damascus, have you?
Jacob is the son of Mathan, descended from Solomon. After Mathan died, his widow married Melchi, descended from Nathan, and they had a son Heli. Thus Jacob and Heli are both sons of the same mother, but to different fathers.
Note also that while Joseph is the genetic descendant of Jacob, he is legally the descendant of Heli. This is important when we remember that one of Solomon’s descendants, Jehoiakim, through whom Jacob is descended, was cursed by God to have no descendant of his sit on the throne of Israel.Jeremiah 22
30 Thus says the LORD:
‘ Write this man down as childless,
A man who shall not prosper in his days;
For none of his descendants shall prosper,
Sitting on the throne of David,
And ruling anymore in Judah.’
By being legally descended from Nathan’s line, Joseph avoids being subject to the Jehoiakim curse.
John