Catholic, Christian question

Do you mean 1 John? I thought that was written by the same John who wrote the gospel, not John the Baptist.

You are correct. At least, while we don’t know for sure they were written by the same person, they have a lot in common and are commonly ascribed to the same author. (The link is to the Staff Report: “Who wrote the Bible? (Part 4)”)

John the Baptist is the first John we meet in the story of Jesus, but I’ve never heard anyone claim that he wrote the book of 1 John in the Bible.