This is how we at Röcklinger set up LTspice for input impedance analysis
Use a current source with the fixed magnitude of 1 Ampere:
From Ohms law we find that U = I * Z and as the current source is set to 1 Ampere then in this case the magnitude of the Voltage is equal to the Impedance.
Do an AC analysis and plot voltage of interest divided by the current source. Set the scale of Y-axis to linear and voila impedance is ploted.