I have a jcb corded drill that seems to have suddenly stopped working
Might be worn out brushes, which should be a $5 fix, but the actual price will depend on the specific drill and parts suppliers - as will how easy or difficult it is. Can be a 2-minute job (nice externally accessible brush caps), can take 30 when you have ot open the whole case up to get to them.

Might also be a bad switch, which is usually more money and more time to change out.

Third possibility is a loose wire connection.