Let $\mathcal{X}$ be the $\infty$-topos in question containing an object $X \in \mathcal{X}$. I assume that by $X$ having homotopy dimension $\leq n$ you mean that the $\infty$-topos $\mathcal{X}_{/X}$ has homotopy dimension $\leq n$ in the sense of Def. 7.2.1.1 of HTT, and that your notion of an $n$-equivalence is the same as the notion of being an $(n+1)$-connective map in the sense of HTT Def. 6.5.1.10. If this is indeed ths case then the answer is yes.

To see this, observe that $X$ having homotopy dimension $\leq n$ means exactly that every $n$-connective map $Y \to X$ admits a section. Now suppose that $A \to B$ is an $(n+1)$-connective map and let $g: X \to B$ be any map. Then the pullback $X \times_B A \to X$ is $(n+1)$-connective, in particular $n$-connective, and hence admits a section $X \to X \times_B A$. Equivalently, the map $g: X \to B$ lifts to $\tilde{g}:X \to A$. It then follows that the map $[X,A] \to [X,B]$ is surjective. To show that it is also injective suppose that $\tilde{g},\tilde{g}': X \to A$ are such that $f\tilde{g}:X \to B$ is homotopic to $f\tilde{g}':X \to B$. Then any choice of homotopy $f\tilde{g} \sim f\tilde{g}'$ determines a map $h:X \to A \times_{B } A$. Using the fact that $A \to B$ is $(n+1)$-connective one can prove that the diagonal map $A \to A \times_{B} A$ is $n$-connective. Arguing as before we see that $h$ lifts to $\tilde{h}:X \to A$. Unwinding the definitions, this exactly means that the homotopy $f\tilde{g} \sim f\tilde{g}'$ lifts to a homotopy $\tilde{g} \sim \tilde{g}'$ and hence $[\tilde{g}] = [\tilde{g}']$ in $[X,A]$.