Effect of the finite range of the nuclear force on the dynamics of fission and heavy-ion collisions