Let's first keep in mind that to even make it into the Bible the source had to be "accepted" by some significant percentage of the "Christian" population at that time. Only four such community projects made it through that process. John is unique in terms of the LENGTH of narratives attributed to Jesus, as well as the CONDITIONS in which these talks are given, i.e. only the apostles were supposedly present. This particular speech is given ONE TIME, not many times as might be true for the Sermon on the Mount. It's given ONLY to apostles present and it's not a 'short' quote.
In terms of "possibilities", it's "possible" that anyone could have written it. In terms of 'probabilities' however, it's likely that only a direct apostle of Jesus would A) have privy to that information, and B) manage to be 'trusted' well enough to convince a whole community to put "faith" in his depiction of Jesus and his words in that moment.