They were written about 40 years after the resurrection so there would still have been eyewitnesses.
Not many look at the average lifespans of that time if the eyewitness was a child 10 years old he would be 50 by the time it was written down so most likely dead tough lets say some children did survive that time and where interviewed by the authors. How much would their story differ from the actual events? Try it yourself look for a video that was made when you where young and you are in it. Then write down what do you think happened in the video in the greatest detail possible then watch the video and see how well you did.
Bronze Age and Iron Age[10] 35+
Classical Greece[11] 28
Classical Rome[11] 28
Pre-Columbian North America[12] 25-30
Medieval Islamic Caliphate[13] 35+
Medieval Britain[14][15] 30
Early Modern Britain[10] 40+
Early 20th Century[16][17] 30-45
Current world average[18] 67.2