Your analysis is right. The probability that $X=n$ is indeed $(n-1)(0.5)^n$. This is because we need to have exactly $1$ head in the first $n-1$ tosses (probability $(n-1)(0.5)^{n-1}$) and then a head (probability $0.5$). So the required expectation is $\sum_{n=2}^\infty (n)(n-1)(0.5)^n. \qquad (\ast) $
To get a closed form for this, note that (if $|x|<1$) then $\frac{1}{1-x}=1+x+x^2+x^3+x^4+x^5+\cdots.$ Differentiate both sides with respect to $x$, twice. We get $\frac{1}{(1-x)^2}=1+2x+3x^2+4x^3+5x^4+\cdots,$ and then $\frac{2}{(1-x)^3}=2+(3)(2)x+(4)(3)x^2+(5)(4)x^3+ \cdots.$ Put $x=0.5$. We get $16=2+(3)(2)(0.5)^1 +(4)(3)(0.5)^2+ (5)(4)(0.5)^3+\cdots. \qquad(\ast\ast)$ To make the right-hand side of $(\ast\ast)$ equal to $(\ast)$, we need to multiply by $(0.5)^2$. So our expectation is $(16)(0.5)^2$, which is $4$.
There are better (meaning more probabilistic) ways of tackling the problem. For example, let $X_1$ be the waiting time, that is, number of tosses, until the first success (head), and let $X_2$ be the waiting time between the first success and the second. Then $X=X_1+X_2$, and therefore $E(X)=E(X_1)+E(X_2)$. The random variables $X_1$ and $X_2$ each have geometric distribution with parameter $p=1/2$. The expectation of a geometric distribution with parameter $p \ne 0$ may be something you have already seen: it is $\frac{1}{p}$. Note that the same idea works with essentially no change if $X$ is the number of tosses until, say, the $17$-th head.