I'm not sure what you mean - you're not looking for anything - but if you do decide to be inspired by classical piece that's 100% okay, but there is a fine line between inspiration and plagiarism - and this crosses that line for me.
Even if a few notes are different, the sonic identity and imprint is still there. You need to add enough variation in the (rhythms, notes, etc.) to have it not resemble the original melody so much.
As for memory, that's your responsibility to double check if you think something sounds familiar. I mean at some point you had to have heard the song before and it left on an impression on you right?
I'm not trying to be harsh but I'm trying to be realistic. If you were working the industry if you did something like this and it was another song perhaps, you would be indicted for plagiarism and potentially sued, and the consequences would be far greater and harsher than what would happen here in a game jam. This is a lesson that is best learned now rather than later.