Your rear derailleur has probably gone into crash mode. This means the motor has disengaged from the cage, blocking any further shifting. In order to restore normal operation, first make sure your rear derailleur and derailleur hanger are not damaged. Then get on your bike and press and hold the button on your junction box for 5 seconds until a red light flashes.
The rear derailleur will go through all the gears now, so make sure sure you spin the cranks until it’s done. Once it has gone through all the gears you’re done and ready to get back to enjoying your ride.