Jesus would have spoken Aramaic which is descended from Hebrew, but is not the same language.
This is evidenced by the fact that in the few places where Jesus words are left untranslated, he is speaking in Aramaic—Abba, father. And Talitha cum (Daughter arise)
Also, whether or not Matthew is the first gospel is a matter of some debate. The Greisbach hypothesis, for example, suggests that Mark is the first Gospel, from which Matthew and Luke drew in order to flesh out their accounts. If Mark is the first Gospel, then its main witness, Peter, would probably have spoken to Mark in Aramaic.
Many manuscripts of the time would be dictated to an emaneusis—a scribe who would listen and then write. Since Aramaic was such a limited language, it is not altogether unlikely that the emaneusis would have listened to what was said by the author, but written it down in Greek. Greek was the lingua Franca of the old world, even if not the language that people spoke. It would be akin to English today.
An analogy might be as if you were an obscure Swedish band in the 70s, but then you had an idea for a song you wanted to get out to the whole world. Your thinking process would be in Swedish, a few drafts might even be in Swedish, but the translation would be so early that everybody would have thought of it in English.
So too with Koine Greek. The area may have spoken Aramaic, but the world spoke Greek. As such, you'd use Greek.