It all depends on precisely which version of the song you're talking about (and which version of Matty Groves, come to that!). Writing in the late 1950s, Bertrand Bronson described it as the thirteenth most popular (of the ballads listed by Child) in the British-American tradition; that probably means several hundred known examples by now, and a good few tunes, not counting related songs on the same theme like The Streets of Derry (Derry Gaol). If you're talking about the version on the DT, then only somebody who has the record that it was transcribed from can help; if only people would give useful references instead of just quoting obscure (to the rest of the world) Revival performers...aarrgghh. I have a number of English versions the tunes of which would fit, but no way of knowing which, if any, come close to the one in question.
Here is what I've found online so far, beside what Joe has already pointed to; mostly no help with tunes, I fear.
On the DT:
The Prickilie Bush Transcribed from a record, no tune or prior source given. It may be an American version, but is so close to versions found in the UK that it's impossible to tell.
The Streets of Derry As recorded by Julie Henigan (see below), no tune given.
In the Forum:
Leadbelly and the Gallus Pole Brief discussion.
Streets of Derry Transcriptions from records by Peter Bellamy and Julie Henigan (the latter apparantly a composite partly derived from a version sung by Janet Russell). No tunes or prior sources given. As it happens, I have a copy of the Bellamy recording (Both Sides Then, Topic 12TS400, 1979); he mentions in his notes that he "adapted it from the singing of Sarah Makem of Armagh". There is a transcription of her version in Kennedy's Folk Songs of Britain & Ireland.
There is an entry at The Traditional Ballad Index:
The Maid Freed from the Gallows [Child 95]
I couldn't find anything at Bodleian Library Broadside Ballads.
There is an article from The Cambridge History of English and American Literature here: § 8. The Maid Freed from the Gallows; The Making of Ballads; General Outlines of Ballad Progress.
There is a RA sound clip of an American version recorded by Phil & Gaye Johnson (Folk Songs from Carl Sandburg's The American Songbag) here: Maid Freed from the Gallows
There are two traditional American versions, with staff notation and audio files, at the Max Hunter Folk Song Collection:
Hangman, Hangman As sung by Mrs. Pearl Brewer in Pocahontas, Arkansas on November 12, 1958.
The Hangman As sung by Mrs. Laura McDonald in Springdale, AR on July 23, 1958.
Analogues of this song turn up all over Europe, at least 50 examples having been found in Finland. The following is a quote from an abstract of a paper, Lithuanian Folk Songs About Setting Free And Their Parallels In The Ballads Of European Nations, by Auðra Zubavièiûtë:
"..the international ballad, that is known by name Lunastettava neito in Finland, Den Bårtsalda in Sweden, The Maid Freed from the Gallows in England, Die Losgekaufte in German. The Finnish scientist Iivar Kempinen inserted Lithuanian folk songs about setting free in his book Lunastettava neito (1957) like variants of the international ballad. Ballad's main motive is girl's setting free from captivity. The ballad's content narrates about the young maiden, who is in captivity. She asks her father, mother, sister, brother, fiancé to ransom her with best animals (cow, sheep, bull etc.) or things (sword, house, crown, ring etc.). Nobody will part with their property; only girl's beloved ransoms her. The maiden curses all her relatives and blesses her fiancé."
Malcolm