You didn't actually get the key yet, you gotta pay attention to the victory screen. Just because you beat the boss doesn't mean you got the key. I think it shows a better monster (maybe a King Slime?) on the victory screen if you actually get the key, I forget. Gotta keep beating the boss until...