Does John 13:36 and 14:5 contradict John 16:5?
This is not a contradiction in the book of John. Let me explain the context of each of these verses and it will make a little more sense. Let’s start with Peter in John 13:36. Peter does ask where Jesus is going. But he presumes the answer.
Jesus answers him that where he is going, Peter cannot follow now. Jesus is talking about going to the Father in heaven. But Peter only presumes that he is talking about going to his death (John 13:37b). And Jesus tells him that he won’t even be able to keep from denying him three times before morning.
He does tell Peter that he will eventually follow him. And we know that Peter was crucified upside down on a cross because he did not want to be crucified the same way Jesus was, not seeing himself as worthy enough of Jesus’ death.
Peter’s presumption that Jesus is going to his death and they can’t follow is wrong. Jesus is going to his death, but Jesus is referring to going to heaven with the Father, not to his death specifically. Either way, none of them is willing to lay down their lives as Peter promises to do here. And we know from the rest of the gospel accounts that none of them volunteered to follow him to the cross.
Moving to the second verse you mentioned, John 14:5, Thomas does not actually ask the question about where Jesus is going. He says that the disciples don’t know where Jesus is going. Even in their asking they had no idea what he was talking about.
Jesus says a verse before this that they know the way he is going. He is referring to himself as the Way, Truth, and Life (John 14:6). In other words, Jesus is saying they know him as the Way. But Thomas says that they don’t know where he’s going so they don’t know the way to get there.
Jesus is talking about himself as the only Way to live this life, and then die, and join him where he is going, to the Father in heaven. It is through the door of death that we pass from this life into heaven with Christ if we know him (John 14:6b).
He is telling them that he is the only way to the Father where he is going. So there is no contradiction when we finally get to John 16:5 where he declares the place he is going, his destination.
He says that none of them has asked him where he is going without presuming the answer. And the answer is not what they expected. Their confusion over this entire matter shows that they didn’t ask the question without presuming the answer. Therefore, they didn’t truly ask him where he was going. And none of them asked him how to get there with him.
This is what Jesus refers to when he tells them that none of them has asked him where he is going. Peter presumed the wrong answer, his expectation in his question. And Thomas didn’t ask.
The disciples not only did not understand that Jesus was going to the Father in heaven, but none of them asked how to get there through Jesus as the only Way to the Father.