No one knows who really wrote the Gospels. This post explores that well with a variety of sources and analysis. Also there is talk about this question: If the Bible is God’s word, why didn’t Jesus write anything?
Considering Jesus’ “lost years”, this is a good point. It’s not like Jesus didn’t have time to do some of his own writing before he started down the road leading to crucifixion.