YouIn your second method you are incorrectly assuming that at maximum compression the system is in equilibrium where the forces cancel out in your second method. This is not the case.
Determine the spring force from the displacement found in your first method. You will see that it is larger than the object's weight.
If you want to go ahead and use forces, accelerations, etc. then you need to first determine the velocity with which the object hits the spring: $$v_0=\sqrt{2gH}$$
And then use Newton's second law to determine the acceleration as a function of position (down is positive, $y=0$ is at the top of the uncompressed spring ): $$a=\frac Fm=g-\frac kmy$$
This gives you a second order differential equation you can solve using initial conditions of $y(0)=0$ and $v(0)=v_0$ to get $y(t)$. From there you can find the maximum compression of finding $y(T)$, where $T$ is a time such that $v(T)=0$. I will leave this to you should you choose to do so.