I purchased a 20 watt solar panel to be mounted to the hardtop of my boat to charge my batteries. The directions say put the controller within five feet of the batteries and the solar panel can be up to 20 feet from the controller. The wires that came with it we're not 20 ft long. I extended them with 12 gauge stranded wire and used the proper waterproof butt connectors. I do not see either of the lights on the controller lighting up if I move the controller back two within five feet of the solar panel the lights light up as they should I have solid continuity through the splices but the controller lights do not come on when I put the controller back by the batteries. My question to you is can I reverse the connection and leave the controller in the overhead box and run the wires back to the batteries and have the solar panels still perform is proper function.
Congratulations on doing it properly as you can in your situation, on adding an extension in a competent manner and in thinking about other ways to achieve your requirement.
Fortunately, it is likely that you have done something wrong with your extension cable. I say "fortunately" because it shoul be possible to make what you have done work.
Perhaps the polarity from panel to controller has been reversed when you added the extension. Check the polarity with a voltmeter, with the cable connected to the panel and disconnected at the controller.
12 gauge wire from panel to controller should be VERY adequate and cause no problems at all. Resistance is under 0.1 Ohms and voltage drop at 20 Watts is probably around 0.1 - 0.2 V.