generally this problem is resolved by checking
-All VDD/VCC and VSS/GND are connected
-ensuring proper capacitance
-pullup on MCLR
-Proper stable voltage on power lines
If still it does not solve the problem, do trouble shooting of your PICKIT, sometimes that helps. At times I had this problem because of USB port issue. My USB port was not able to provide sufficient current, I tried on a different laptop and it worked.
Some bits and pieces of problems which cause u issues like this