[edit] To avoid confusion, from the comments you state that you want to find the impedance looking into the source. In other words, this situation:
simulate this circuit – Schematic created using CircuitLab
I could find a few mistakes:
- In the third step, you missed an \$R_D\$:
$$
v_D = \frac{g_mR_D}{1+g_mR_D}V_T
$$
- You also made an additional mistake in the second-last step. But it is irrelevant because of the first mistake.
The expression should resolve to:
$$
I_D = g_m\left(\frac{g_mR_D}{1+g_mR_D}-1\right)V_T
$$
- Then another mistake is that by your voltage/current convention, the impedance will be
$$
Z = -\frac{V_T}{I_D}
$$
Don't forget the minus sign.
The result with these corrections will be:
$$Z = \frac{1}{g_m} + R_D$$
As expected. A diode-connected transistor has an approximate impedance of \$1/g_m\$ which is in series with \$R_D\$.