So I grounded the male fitting and nothing. But when I ground the female fitting the starter motor turned. So solenoid is okay?
The solenoid activates when 12V and ground is applied to the small posts. If you can do that and the starter engages, then the solenoid and starter are okay. Now you will need to figure out why your bike won't apply 12V and ground to the solenoid.
As I said, your bikes bar button supplies the ground which is routed from the starting safety unit. That little box has logic in it to provide that ground when either the bike is in neutral or the clutch is disengaged. It is quite startling to gave the bike jump forward when the button is pushed, hence the safety unit.
You've probably noticed the kick start won't work unless the clutch is engaged. Best be in neutral for that. But, if you stall it going away from a stop, it is quite handy to just pull in the clutch and hit the start button to be your way with minimum delay. Other drivers will otherwise drive around you within minimum distance, usually cursing at you.
As mentioned, a cold engine won't idle without some added throttle (poor fuel atomization). After the engine warms it should settle into 1000-1100 rpm, adjusted with the big idle knob.
Cheers,