This sounds like an old traditional ballad but is actually a poem by Thomas Campbell (1777-1844) from Argyllshire. This seems to be the only instance of the song being collected in oral tradition in England although several American versions exist.
Notes by Gwilym Davies 3 April 2016