Beach Boys covered the Kingston Trio. Possibly the Beach Boys heard it via Dick Dale, King of the Surf Guitar, who also had a somewhat popular version prior to BB.
The song goes back at least a hundred years and was popularized by poet Carl Sandburg.
Very compelling song.
"Sloop John B" is the seventh track on The Beach Boys' Pet Sounds album and was also a single which was released in 1966 on Capitol Records. It was originally a traditional West Indies folk song, "The John B. Sails," taken from Carl Sandburg's 1927 collection of folk songs, The American Songbag.
Thanks ... I learned something!