It means that you have forgotten where the keys are supposed to go - where you should put the keys.
You are pet sitting for a friend. She told you to leave the keys somewhere. You forgot where. You text her: All is well. Chloe has been fed. But I have forgotten where to put the keys."
If you forgot where you put the keys, then "I forgot where I put the keys" is the way to say it.
Interested in Language