How can I find the drain transfer function of a MOSFET on LTSpice?
I won't say anything about you circuit, but if what you want is a MOSFET equivalent model, then I'd first look here, for example, or similar places. Otherwise I have to wonder what's the purpose of that 1 A current source in there (or why there are two grounds).

That said, you should know that a voltage source, in SPICE, has zero (or machine zero) internal resistance. That means that a capacitor placed across it will be useless, and an inductor across will cause an error (if there is no resistance involved). So in your first case you are placing the input source, Vo, across Cds, which makes Cds useless. You are also reading the voltage right across your input source (as I presume the Vo node does), so you are reading the flat response of an .AC source. No surprises here.

If you were to read the voltage at the Vg node, then R1 and Lg would be useless since you have no load, i.e. there is no current through them, and all you'd be measuring would be a capacitive divider formed by Cgd and Cgs. Adding a (say) 1 M&Omega; resistor to ground from the Vg node would make the response include the series RL, too.

In the 2nd case, you have a valid reading, for the given circuit.

As a minor conclusion, remember this: GIGO = Garbage In, Garbage Out. Which is the equivalent model for you reap what you sow.