Temp gauge not working?

I took my dart out for a cruise tonight and enjoyed myself then I got home and saw the bad news. Coolant was dripping from the overflow tube and some had come out the cap. My temp gauge never went above half way so I recon I have a bad sensor or wire. The sensor is less than two years old but the connection is very loose. Like I can pull it off with zero force.

Can I just get a new connector or should I just get an aftermarket gauge and line?

Personally, wouldn't go aftermarket. I like OEM stuff and the OEM look. But, that's me.
You might be able to gently, partially crimp the connector and get it to grip the stud better.
I would also test your gauge setup. First, by momentarily grounding the connector straight to the engine block. The needle should peg to the high (hot) scale.