2V / 20ma = 0.1 so a resistor of 1 Ohms is required.
If you want to reduce the brightness of the LED increased the resistor value.
You can demo this live and tweak the resistance when the app is running.
Battery Voltage Divided by Calculated Diode Forward Voltage equals total resistance value.
This is the most simple LED circuit.
The resistor is used in the circuit to reduce the current.