"Nine Hundred Miles" is a railroad/rambling song from the South. It is similar to "Reuben's Train" and and some versions such as Grayson & Whitter's "Train 45" recording intermix phrases from both.
It was printed in John and Alan Lomax's Best Loved American Folk Songs (1937) and is in the Roud Index of Folk Songs as #4959.
In addition to Grayson & Whitter it was recorded by Fiddlin' John Carson (1924), George & Bobby Childers, Woody Guthrie & Cisco Houston, Riley Puckett and others.
This version is pretty close to Woody Guthrie's version.
"Five Hundred Miles", composed by Hedy West and popular in the 1960s folk revival, is essentially a rewrite of this song with a different tune, but with several overlapping verses.
It was printed in John and Alan Lomax's Best Loved American Folk Songs.