I ordered the cable from ridewill in italy for $45 USD shipped, and it showed up at my house in USA three days later. Very impressive.
The installation was simple. A handful of bolts to take off the skid plate, which I realized is cheap garbage that won't protect anything in an impact.
Flip the bike over, pull out the motor bolts, and replace the cable. As others have said, be careful not to catch a wire when closing the motor back up. Took about 20 minutes. You'll need a short allen key to access the bolt behind the chainring. No need to remove the chainring.
Bike is working fine again.
Thanks to everybody on this thread for their help.
I kept the original sensor cable which I snapped in half, and I will likely learn how to splice this together and keep it in my toolkit as a spare. It would be a hassle to replace this on the trail, but it is doable. Not sure why this essential cable is positioned in an area where it is very easy to get snagged by your foot.