Need help with electrical wiring for lights
Not sure you need a junction box at the light. What’s weird is it sounds like the switch controlled a receptacle and light in two different rooms on different floors? Are you wanting that switch to still control the basement light or are you wanting a different switch? Have you tried connecting the outlet back to see if it gets power?