Its located sort of under the starter and in the transmission case, held in with 1 bolt.
Probably need to remove starter to get it out.
Check under the starter with a flash light (look from right side of bike) and you will see it. There is a small harness connected to it.
I don't think this is causing your stalling issues.. It can cause speedo reading issues.