I'm not aware of there being a single word that directly carries the meaning you are looking for. But there are a number of ways that you could refer to it.
You could refer to it as an 'adaptation'. If you want something with more style, or perhaps with a slight suggestion of a judgement, you could say it was an 'appropriation" of the melody.
'Parody' might not directly apply, because your intention isn't to be funny, satirical etc. That said, when the melody is well known, as in your example, and would be immediately recognizable even with the new lyrics, I think the word parody could be appropriately used, since part of the effect or 'charm' of what your doing is derived from a comparably parody-like recognition on the part of the listener, and on the way in which they listen: to some extent they will be hearing the original "underneath" your version, and comparing the two, and in doing that, the meaning of and their feelings about the original will color their reception of your adaptation/appropriation of the melody. That is in effect what happens with parody, where the contrast between the original and the new is what produces much of its effect. Conventional parody plays it more explicitly for laffs, but I don't think the word would be terribly misapplied if applied in the example you gave.
I imagine that most people would reach first for 'parody' to describe it, and that few would heavily quibble with it, which in some sense makes it correct.
Depending on the particulars, I might say that I had "appropriated" the melody -- making the composite words and music an 'appropriation' -- just because the word contains so many overtones concerning the correctness, propriety, appropriateness, ethics, legality, etc., of what what's taking place, without actually endorsing any of those interpretations. Otherwise, and less flamboyantly, I would say I adapted (adopted!?) or borrowed the melody. In this context, they all mean essentially the same thing. The choice would be based on the kind of attention you wanted to call to it, and on what kind of comment, if any, you wanted to make on it.
And you could always refer to it as a rewrite.