Why the second example can not the reach the final stone?

The available jumps are (k1, k, k+1) where k is the length of the last jump, not how many jumps you did. So in the third line of your explanation :
"then jump 1 units to the 5th stone(4), 3 jumps, possible next jump is 2, 3, 4;"
It should instead be :
then jump 1 units to the 5th stone(4), 3 jumps, possible next jump is 0, 1, 2;
And from there you can see why it doesn't work with the second example