Probably their distance from him was the cause that they did not know him, though they had seen him once and again since his resurrection from the dead: others think, that by the providence of God their eyes were holden that they should not know him, as Luke 24:16.
Related Commentaries of John 21:4
John 21:4
4 But when the morning was now come, Jesus stood on the shore: but the disciples knew not that it was Jesus.