There's likely to be a plunger type switch on the slam-panel (or possibly on a bracket near the bulkhead).. or a micro-switch within the bonnet latch that is sticking and sending a dodgy reading.
If you find which it is (I presume the micro-switch within the bonnet latch is going to be more likely) then take it off the car, find the micro-switch and clean it all up. Some micro-switches can be fixed when they fail (boot latch etc.) but others are impossible to replace and only come with a new bonnet catch, for the manufacturer's convenience... Hopefully yours is just greasy/can be cleaned.. or is available separately if it can't.
Ralf S.