Didn't know you asked.
The "Way" of the Gentiles" is into "Galilee of the Gentiles", and they had to go through Samaria to get there, and Jesus began His ministry there, before He called all His Apostles and disciples, and did His first miracle in Cana.
As soon as the disciples returned from the evangelism trip where they were forbidden to go "by the Way of the Gentiles" -into Galilee- or into any village of the Samaritans", He then went there with them, and they ministered, for John 4 speaks of the after time of Matthew 10.
Please note Jesus did not say "do not go to Gentiles" "ever" -"but do not go by the Way of the Gentiles nor into any village of the Samaritans" on one specific mission, but He explained to them that He sent them that time to labor in the harvest where others had gone before them to labor -to the lost sheep of Israel;
He explains to them that He had sent them to labor in the easy harvest, but His meat was to do the Father's will, and labor where it was hard -as a Light to the Gentiles", for He had just offered Living Water to a Gentile woman; and then He took them into the Samaritan villages and ministered two days, with His Apostles, and many of them believed in His Name -all Gentiles.
Mat 10:5 These twelve Jesus sent forth, and commanded them, saying, Go not into the way of the Gentiles, and into [any] city of the Samaritans enter ye not:
Jesus began preaching there "By the Way of the Gentiles";
Mat 4:12 Now when Jesus had heard that John was cast into prison, he departed into Galilee;
And leaving Nazareth, he came and dwelt in Capernaum, which is upon the sea coast, in the borders of Zabulon and Nephthalim:
That it might be fulfilled which was spoken by Esaias the prophet, saying,
Mat 4:15 The land of Zabulon, and the land of Nephthalim, [by] the way of the sea, beyond Jordan, Galilee of the Gentiles;
The people which sat in darkness saw great light; and to them which sat in the region and shadow of death light is sprung up
Mat 4:17 From that time Jesus began to preach, and to say, Repent: for the kingdom of heaven is at hand..
Mat 11:1And it came to pass, when Jesus had made an end of commanding his twelve disciples, he departed thence to teach and to preach in their cities.
.....
Jhn 4:1-43 When therefore the Lord knew how the Pharisees had heard that Jesus made and baptized more disciples than John,
(Though Jesus himself baptized not, but his disciples,)
He left Judaea, and departed again into Galilee.
And he must needs go through Samaria.
Then cometh he to a city of Samaria, which is called Sychar, near to the parcel of ground that Jacob gave to his son Joseph.
There cometh a woman of Samaria to draw water: Jesus saith unto her, Give me to drink.
(For his disciples were gone away unto the city to buy meat.)
Then saith the woman of Samaria unto him, How is it that thou, being a Jew, askest drink of me, which am a woman of Samaria? for the Jews have no dealings with the Samaritans.
Jesus answered and said unto her, If thou knewest the gift of God, and who it is that saith to thee, Give me to drink; thou wouldest have asked of him, and he would have given thee living water.
Jesus answered and said unto her, Whosoever drinketh of this water shall thirst again:
But whosoever drinketh of the water that I shall give him shall never thirst; but the water that I shall give him shall be in him a well of water springing up into everlasting life.
......
Jesus saith unto her, Woman, believe me, the hour cometh, when ye shall neither in this mountain, nor yet at Jerusalem, worship the Father.
Ye worship ye know not what: we know what we worship: for salvation is of the Jews.
The woman saith unto him, I know that Messias cometh, which is called Christ: when he is come, he will tell us all things.
Jesus saith unto her, I that speak unto thee am [he]...
The woman then left her waterpot, and went her way into the city, and saith to the men,
Come, see a man, which told me all things that ever I did: is not this the Christ?
Then they went out of the city, and came unto him
In the mean while his disciples prayed him, saying, Master, eat.
But he said unto them, I have meat to eat that ye know not of.
Therefore said the disciples one to another, Hath any man brought him [ought] to eat?
Jesus saith unto them, My meat is to do the will of him that sent me, and to finish his work.
Say not ye, There are yet four months, and [then] cometh harvest? behold, I say unto you, Lift up your eyes, and look on the fields; for they are white already to harvest.
And he that reapeth receiveth wages, and gathereth fruit unto life eternal: that both he that soweth and he that reapeth may rejoice together.
And herein is that saying true, One soweth, and another reapeth.
I sent you to reap that whereon ye bestowed no labour: other men laboured, and ye are entered into their labours.
And many of the Samaritans of that city believed on him for the saying of the woman, which testified, He told me all that ever I did.
So when the Samaritans were come unto him, they besought him that he would tarry with them: and he abode there two days.
And many more believed because of his own word;
And said unto the woman, Now we believe, not because of thy saying: for we have heard [him] ourselves, and know that this is indeed the Christ, the Saviour of the world.
Now after two days he departed thence, and went into Galilee.
Bible doctrine is not MAD doctrine, no not!!! and Jesus came to be a "Light to the Gentiles" -and to restore Israel to the Father, also.