Yes, Jesus could have avoided arrest and death if He had chosen to do so -- and He did avoid them during most of His ministry. When people in his hometown of Nazareth attempted to kill Him, for example, He deliberately escaped (see Luke 4:28-30).
But Jesus Christ came for one main reason: to become the final and complete sacrifice for our sins. In the final hours before His arrest, Jesus confronted the terrible ordeal He was about to endure, and yet He did not refuse it because "It was for this very reason I came to this hour" (John 12:27). This was God's purpose in sending Him into the world.
Remember: Our greatest need is to be reconciled to God -- but that is only possible if our sins are somehow erased. And this is what Jesus came into the world to do. Ahead of Him wasn't just the physical suffering of the cross, but the spiritual horror of enduring the judgment we deserve for our sins. He was without sin -- but all our sins were placed on Him, and He died in our place. As the Bible says, "God made him who had no sin to be sin for us, so that in him we might become the righteousness of God" (2 Corinthians 5:21).
What does Jesus Christ's death mean to you? Have you confessed your sins to Him and asked Him to cleanse you and make you His child? Don't let another day go by without Christ.