There are multiple reasons. Here are some that come to mind right away.
- India lacks in intellegence gathering. - Political elite does not have the spine to act and risk future - Army not agile enough to handle terrorism challenge. Good for mass invasion. Needs more training and equipment on surgical operations - Israel and the US have so far not been successful in defeating insurgencies. - India needs to use political, economical, social and military power to overcome this challenge. It is NOT exclusively a military challenge.