Answer: Ternary strings have symbols 0, 1, and 2. If there is exactly one 1, then there are 3 positions the one can be in and 2*2*2 ways to fill the other 3 blanks with a 0 or a 2. So the answer is 3*2*2*2 = 24.
I don't understand why there can only be 3 positions the one can be in?
You are correct that there are four places to put the $1$, even if leading zeros are prohibited. Usually with strings leading zeros are allowed, so your implied answer of $4 \cdot 2^3=32$ is a good one.