إِلَى أَنْ جُبْتُ مَا بَيْنَ فَرْغَانَةَ وَغَانَةَ
Until I had traversed the lands between Farghānah and Ghānah.
Jubtu means that he covered or traversed places. The named locations evoke far-flung regions and an extraordinary span of travel. Their similar endings also give the line a pleasing sound.
The point is not a precise mileage calculation but the scale of the narrator’s wanderings, expressed with heightened literary style.