Newton's second law, ma=−kx, asks for a motion whose acceleration is −mk times its position. Try x=Acosωt: differentiating twice gives a=−ω2Acosωt=−ω2x, which fits exactly when ω2=mk. So
T=ω2π=2πkm A does not appear: pull further and the force is larger in proportion, so the mass covers the longer trip in the same time. This is why a spring makes a good clock.