Your proposed machine will not halt. If by $0$ you mean a blank cell, given a blank tape it will not write anything and forever shift left. That neither writes $n$ nor terminates. If you allow writing either $0$ or $1$ and you start it with one of those under the head it will just write an infinite sequence of that same digit without halting.
For this purpose it is easy to describe a Turing machine that does this. We will start writing from the right. We start at state $0$, write the rightmost bit of $n$, move the tape left, and go to state $1$. Each state writes the proper bit and moves the tape left. The final state halts instead of moving the tape. This machine does not need to consider what is on the tape. It justifies the claim that we can write $n$ with the claimed number of states, but does not show that there is not a smarter machine that can do it in less states.
Most Turing machines that I have seen actually work in base $1$, not base $2$. They represent $n$ by a series of $n+1$ marks, using a blank as the separator between numbers. That is not how this problem is defined.