Temp sensor P0118

Hi everyone
New to forum a lot of great information on this site. So the problem I
Have is my cooling fan quit I checked fuses all were good so I unplugged sensor to check and fan came on. I figured sensor was bad. I replaced it now fan turns on after about 20sec and check engine limp home comes across screen. Any thoughts would be greatly appreciated. Oh I have a 2009 renegade x
Thank you