Transconductance value in LTSpice
Take a number of data points using the configuration in your first figure (apply Vgs, measure Ids). Graph them out, and see for what region they follow the classical long-channel square-law behavior to which you're trying to fit your curve.
There are several methods for determining Vth and K'. For your case, the most appropriate one is to plot sqrt(Ids) as a function of Vgs. The slope will provide K', and extrapolating the intercept provides Vth.