There were a lot of people in Jerusalem who saw Jesus as a threat to their careers. When the Sadducees, the Herodians and the Pharisees all discovered they faced a common threat, they joined forces to eliminate Jesus in order to preserve their own political prospects.
That opposition was largely centred on Jerusalem. All Jesus needed to do was to avoid Jerusalem and he would have been reasonably safe.
He could have travelled, like St Paul did, and taken his message to the many Jewish communities of the Roman Empire. To have done so would have fulfilled numerous Old Testament prophecies. But he didn’t take that path.
He could have chosen to raise an army to take over Jerusalem by force, and restore the kingdom of his ancestor, David. That also would have fulfilled many Old Testament prophecies. He didn’t take that path either.
Jesus chose to walk into Jerusalem and present himself to the people conspiring to kill him. There was only one likely outcome - his death.
Why did he do that?
Jesus’ whole life had been a public demonstration of the nature of God. If we can begin to understand why Jesus chose to die, we will begin to understand God.