Can a 26 Inch Controller Drive a 20 Inch Wheel?
You may be able to reprogram the wheel size controller from the lcd control panel (or usb reprogramming cable). But this assumes a certain level of intelligence in the controller and yours might not have this capacity. You’d have to check with the vendor.

Even if it were reprogrammable you have the following challenges:


Motors have optimum torque and speed ranges. Your motor may be wound for slower rotations of a 26” wheel and won’t give you enough speed that a 20” needs
controllers may obey the ebike assist speed limit by limiting max RPMs. If your controller isn’t wheel size reprogrammable you’ll find yourself limited to a much reduced speed  and even if you can, the physical/electronic max rpm limit may still limit your top speed (my Bafang geared hub motor/controller doesn’t seem to go above a certain rpm irregardless of the wheel size; this may be either a motor or controller limitation) 
you’ll need to build the wheel and you might find some of the spoke angles are going to be very tight
a rear ehub will not fit normally in the front forks because of the hubspacing and freewheel clearance.