Reversing the direction of the supercurrent in a controllable Josephson junction