Welcome to PF!
First of all, your equation (1) defines the external work done by/on a system. If no energy is added or lost (Wext = 0), Kf + Uf = Ki + Ui.
Second, your question is not clear. What do you mean when you say U(final) - U(initial) applies? U(final) - U(initial) is not a mathematical statement.
Finally, your statement: Spring force = 0.5kx2
is not correct. F = -kx.