Jesus was related to St. John the Baptist through Mary's connection to Elizabeth, though it's uncertain exactly what that meant.
It’s often said that Jesus was St. John the Baptist’s cousin. Is that true?
According to scripture scholar Dr. Edward Sri in his Commentary on the Gospel of Matthew, “The Hebrew language had no word for cousin.”
This is supported by John Alexander Clapperton in his 19th-century book Pitfalls in Bible English, examining the Greek word used in the New Testament.
The word “cousin” is used in different places in Shakespeare, sometimes for nephew, sometimes for niece; twice for uncle, once for brother-in law, and three times for grandchildren. In the Bible it is used in only one passage (Luke i. 36 and 58) where Elizabeth is called the cousin of our Lord’s mother. It represents a Greek word (suggenes) that had the same vague meaning as our old English word “cousin,” one of the same race, a near relative. The consequence is that we cannot be sure of the relationship between John the Baptist and our Lord.
An article on Catholic Answers similarly concludes that “All we can tell from the word suggenes is that Elizabeth was some kind of female relative of Mary’s. But whether she was an aunt, a cousin, or a more distant relation cannot be determined from the word.”
This is why many Bible translations refrain from using the word “cousin,” and use a more vague term.
[B]ehold, Elizabeth, your relative, has also conceived a son in her old age. (Luke 1:36) – NABRE[B]ehold, your kinswoman Elizabeth in her old age has also conceived a son. (Luke 1:36) – RSVCE[B]ehold, your relative Elizabeth in her old age has also conceived a son.(Luke 1:36) – ESV
Jesus and John the Baptist were certainly related, possibly even cousins, but the Bible does not give us enough evidence to determine how closely they were related.