“¶ Now when Iesus had heard that Iohn was cast into prison, he departed into Galilee.”
1611 King James Version (KJV)
4:12 He retired into Galilee - This journey was not immediately after his temptation. He first went from Judea into Galilee, #John 1:43; 2:1|. Then into Judea again, and celebrated the passover at Jerusalem, #John 2:13|. He baptized in Judea while John was baptizing at Enon, #John 3:22,23|. All this time John was at liberty, #John 3:24|. But the Pharisees being offended, #John 4:1|; and John put in prison, he then took this journey into Galilee. #Mark 1:14|.
Mt 4:12 Now when Jesus had heard that John was cast into prison. A long period lapses between the temptation and the next event recorded. Matthew does not try to follow the order of events, and he now passes over more than a year. This year had been actively employed. The intervening events are, (1) the return of Jesus from the wilderness to Bethabara, where the first disciples are called (Joh 1:15-37); (2) the return to Galilee and the miracle at Cana (Joh 2:1-11); (3) the first passover of the Lord's ministry in Jerusalem and the temple cleansed (Joh 2:14-25); (4) interview with Nicodemus (Joh 3:1-21); (5) ministry in Judea (Joh 4:3); (6) leaves for Galilee, passes through Samaria, conversation at Sychar (Joh 4:4-42); (7) heals nobleman's son (Joh 4:46-54); (8) a period of retirement in Galilee, John imprisoned (Mt 4:12); (9) attends feast in Jerusalem, miracle at pool of Bethesda (Joh 5:1-47). (10) returns to Galilee, April A.D. 28. We thus see that an interval of more than a year elapsed between the temptation and the imprisonment of John. John was thrown into prison because he rebuked Herod (Mt 14:4 Mr 6:17). Departed into Galilee. From prudence (Joh 4:1). Christ had been teaching in Judea (Joh 4:2).