What are the solutions to $a^2+ab+b^2$ $=$ $3^n$?

The set of solutions to $$ x^2 + xy + y^2 = 1 $$ in integers is finite (6).

 x = 1, y = 0 target 1
 x = -1, y = 0 target 1
 x = 1, y = -1 target 1
 x = -1, y = 1 target 1
 x = 0, y = 1 target 1
 x = 0, y = -1 target 1

The set of solutions to $$ x^2 + xy + y^2 = 3 $$ in integers is finite(6).

 x = 2, y = -1 target 3
 x = -2, y = 1 target 3
 x = 1, y = 1 target 3
 x = -1, y = -1 target 3
 x = 1, y = -2 target 3
 x = -1, y = 2 target 3

If $$ x^2 + xy + y^2 \equiv 0 \pmod 9 $$ then both $x,y$ are divisible by $3.$

This means that all solutions to your $3^n$ thing are $3^w$ times the items in the first two (finite) sets.