I would say the main reason for India's defeat was the poor bowling of their bowlers. India would not have been defeated if the bowlers had done well. Sri Lanka set a target of 231 runs in the first match and the team set a target of 241 runs in the second match. A target of 241 runs is not a small target on this pitch. Moreover, it was very difficult for India to collect 240+ in the second innings on this Colombo pitch.
Even so, Rohit Sharma managed to get off to a great start in both the matches. Despite getting a big collection from the opening pair, India failed to win. In both the matches, we saw poor performances from experienced players in the Indian middle order. Apart from Rohit Sharma, Gill and Axar Patel, no other batsman can bat well in this match. Despite having so many experienced batsmen in the squad, India's innings stopped at 208 runs. The Indian team was defeated by a margin of 32 runs.
India have no chance of winning the series. India team can draw the series if they win the last match. But the last match will also be held in Colombo. Indian batsmen are not able to perform well on this pitch.
Your statement is not correct about this game because Indian bowlers done good job and restricted Sri Lanka on good score once I was having mind they will be done again on 215 to 220, but seventh wicket partnership allow Sri Lanka to have good target of 250 but still this was not hard job as we have Indian best batting line-up but sadly due to poor batting effort and impressive bowling from the veteran Jeffrey Vandersay allow Sri Lanka to have first won in last three years.
After openers, we have only Axar Patel who done good job and score 44 with all other eight batsmen completely fail to give any stand which is surely now matter of concern for them because things are not favourable in ODI with having second failure in this series against Sri Lanka.
There is no doubt with this win now Sri Lankan confidence is at the top, and they will try their best for having win in last ODI and series as well because this is going to be good for their cricket which is suffering badly in last few years due to lack of quality and good performance.