There are two things being discussed. The authenticity of the date and the authenticity of what it teaches. These are two different things.
There are lots of authentic writings from the second, third and fourth centuries which contain unorthodox teaching. Nobody disputes that the document about Jesus having a wife is an authentic document from its time. What is disputed is whether it teaches truth or fallacy.
There are documents about the heresy of Docetism from the second century. Arius wrote about the heresy of Arianism in the third and fourth centuries. No one claims that their documents weren’t written when they were, only that they don’t contain orthodox teaching.
I want to say, “Who cares when it was written?” It could be an authentic document from the time of Moses for all I care. What I care about is whether it teaches truth. Any document which claims that Jesus was married does not teach truth.