Well $N = \underbrace{111....1}_{k-2}2 = \underbrace{1111....11}_{k-1} + 1= \frac {10^k-1}9 +1$ so if this equal to $2^n$ then $9N= 9\cdot 2^n =(10^k-1) + 9= 10^k + 8$.
If we assume that $n$ and $k$ are both at least $3$ was can divide by $8$ to get
$\frac {9\cdot 2^n}8=\frac {9N}8\implies$
$9\cdot 2^{n-3} =\frac {10^k+8}8 = \frac {10^k}8 + 1=2^{k-3}\cdot 5^k + 1$ which is odd if $k> 3$.
We can rule out that if $k=3$ then $N=12$ is no a power of $2$. So if any $N$ is a power of $2$ we must have $9\cdot 2^{n-3}$ is odd which mean we must have $n=3$. But $2^3 = 8$ is not any $N$ of the form $1111....1$.
.....
Or to put it in a naive but more hands on way:
$2^n = 11111.....1112 \iff$
$2^n = 11111.....1111 + 1\iff$
$9\cdot 2^n = 99999....9999 + 9 \iff$
$9\cdot 2^n = 100000....0000 + 8 \iff$
$9\cdot 2^{n-3} = 100000...0\times \frac{1000}8 + 1\iff$
$9\cdot 2^{n-3} = 100000...0\times 125 + 1$
But LHS is odd and right hand side is even except for small values of $n$ and/or small numbers of ones and those cases can be easily checked.