Ignore all advice above, because it is either the hard way or could only work if very very lucky.
First, you have to verify if it is a good reverse or in invalid wiring combo that spins it in reverse. A nice smooth start, low no-load current at WOT, good torque, and low noise are all indicators of a valid combo.
It's helpful in this process to understand every phase wire combination has one valid combo of halls out of 6 possible, and every hall combination has one valid combo of phases out of 6 possible. That means there are a total of 6 valid combos of 36 possible. 3 of those are forward and 3 of those are reverse. Most motors will spin up with as many as 6 false positive wiring configs (spin the wheel, but it's not a valid combo and can burn up a motor). No load current will tell you this, do you have a way to measure current from battery to the controller? If not, then almost as simple, try the other 5 combinations of hall wires (assuming they are easily swapped). Before changing though, using your current configuration that spins backward with wheel off the ground turn the throttle very slowly and note the sounds just as the motor starts to turn. An incorrect wiring combo that spins the motor, will be rough on startup and sometimes not spin the wheel in certain positions. Every false positive I have seen spins the motor the opposite way of the good forward on that set of wiring configs, so if what you have now is a false positive, then you will get a the valid forward in the other 5 combos of phase wires (or halls if those are easier for you to swap.
If your current config is a smooth starting reverse with low current, then to get it going forward requires a change in both halls and phases. Whichever is more difficult to swap, swap 2, any 2, only 2 of those. Then find the correct combination of the 6 possible for the easier set to swap (halls or phase).
When testing wiring configs:
Make sure chain is off (a reverse spins the pedals as you probably found out.). Use only small short pulses of throttle to check each, because high currents can flow with bad combos. Be systematic when swapping wires and swap just 2 at a time. I find it easiest to choose one wire as my anchor reference, eg controller green. Then I will try the other 2 possible with controller green on green, then controller green on yellow, then controller green with blue. You will find a valid configuration in those 6.
False positives get people in trouble, as does changing around too many wires at once. It's actually quite simple, so don't get frustrated. In the time it took to type this response I could have wired up several motors, even if the wires were all the same color (excluding the red/black +5V/gnd for the halls, which we never touch in this process).
ES has a Wiki that explains wiring too.