True, and it is not the Matthean genealogy which I would say is Mary's genealogy.
Luke 3:21-23 shows that the genealogy is of Jesus and that Joseph was not the real father of Jesus but God is the Father, so maybe we should expect at that point that the genealogy would be swapping to the mother's genealogy if indeed the genealogy is to continue as the genealogy of Jesus with Jesus having a direct lineage to Heli and the rest of those mentioned.
But of course this is speculating and with the notion that both the Matthean and Lukan genealogies are correct.
But, again, no mention of Mary, but rather of Joseph, denotes that Joseph is the trajectory that we are following. Despite the fact that the author is explaining that, ultimately, God is the Father, the author is still defining that it is
acceptedly perceived as Joseph being the ancestor, as far as the lineage to King David is concerned.
Luke is an extremely competent historian, and I therefore would question very little as to how accurate his accounts are. Equally, Matthew would have had access to such genealogies, as such record keeping appears to be an extremely Hebrew thing to do, common knowledge to any student of the TaNaKh. Thus, although different, and seemingly irresolvable, I trust the accuracy of both, regarding each as having a unique technique and convention in defining the lineage.