The biblical account is clear:
1) Saul was sent by the Pharisees to Damascus to persecute Christians there.
Acts 9:1 But Saul, still breathing threat and murder against the disciples of the Lord, went to the high priest 2 and asked him for letters to the synagogues in Damascus, so that he might bring bound to Jerusalem any whom he found who belonged to The Way, both men and women.
... 22:4 I persecuted this Way to the point of death, binding and handing over to prisons both men and women, 5 as the high priest and all the assembly of elders can bear witness. From them I also obtained letters to the brothers in Damascus, and I was on my way to bring those who were there in bonds to Jerusalem to be punished.
2) Saul was "getting near to Damascus" on his anti-Christian mission when Jesus appeared to him.
Acts 9:3 Now as he was traveling and getting near Damascus, suddenly a light from heaven flashed around him
... 22:6 But as I was traveling and getting near to Damascus, about midday, suddenly out of heaven a great light flashed all around me ...
3) Jesus told Saul to go to Damascus, his previous destination, and that there he must do certain things.
Acts 22:10 At that I said: ‘What should I do, Lord?’ The Lord said to me: ‘Rise, go into Damascus, and there you will be told about everything it is appointed for you to do.’
4) Saul met Ananias, was baptized and remained preaching Jesus in Damascus for a time, confusing the Jews who already knew him as a persecutor of Christians.
Acts 9:8 Saul then got up from the ground, and though his eyes were open, he could see nothing. So they led him by the hand and brought him into Damascus. (...) 19 (...) He stayed for some days with the disciples in Damascus, 20 and immediately in the synagogues he began to preach about Jesus, that this one is the Son of God. 21 But all those hearing him were astonished and were saying: “Is this not the man who ravaged those in Jerusalem who call on this name? Did he not come here for the purpose of arresting them and taking them to the chief priests?” 22 But Saul kept on acquiring more and more power and was confounding the Jews who lived in Damascus, as he proved logically that this is the Christ.
... 26:19 Therefore, King Agrippa, I did not become disobedient to the heavenly vision, 20 but to those in Damascus first (...)
The event in which Jesus tells Saul to continue on his way to where he was going, Damascus, is only recorded in Acts. 22:10, but it does not contradict at all the rest of the story according to the other biblical accounts. Rather, it explains to us why Paul continued to Damascus instead of returning to Jerusalem where he had come from.