I don’t see any difference. The line is still through Joseph.
Jesus was known as the son of Joseph. Joseph was the son of Heli.
In Matthew Joseph's father is
16Jacob was the father of Joseph, the husband of Mary. Mary was the mother of Jesus, who is called the Messiah.
Luke gives Mary's bloodline and Matthew gives Joseph's and states such. Both go back to David. Jesus is from David through Mary not Joseph. He is legally Jewish through Mary.