I looked at Wall's paper Classification problems in differential topology. V
On certain 6-manifolds. In theorem 3 of that paper Wall describes some invariants of 6-mainfolds, and the relation between them. These invariants, in the case you are concerned with, are given by:
- The abelian group $H = \mathbb{Z} = H^2(M;\mathbb{Z})$, and the zero group $G = 0 = H^3(M; \mathbb{Z})$.
- The symmetric trilinear form $\mu: \mathbb{Z}^3 \to \mathbb{Z}$ given by $\mu(x,y,z) = \langle xyz, [M]\rangle$, i.e. take cup product and pair with the fundamental class. For the cohomology ring you specify this is just the 3-fold multiplication map "xyz".
- $p_1: H = \mathbb{Z} \to \mathbb{Z}$, which is your integer $n$, corresponding to the 1st Pontryagin class.
- An element $w_2 \in H / 2H \cong \mathbb{Z}/2\mathbb{Z}$ (2nd Steifel-Whitney class), which has an integral lift $W_2 \in \mathbb{Z}$.
These invariants necessarily satisfy three relations for arbitrary $x, y \in H$:
$$ \mu(x,y,x+y + W_2) \equiv 0 \; \; \; \textrm{mod 2} \\ p_1(x) \equiv \mu(x,W_2, W_2) \; \; \; \textrm{mod 4} \\
p_1(x) \equiv \mu(x,x,x) \; \; \; \textrm{mod 3}$$
The first equation, with the given $\mu$, implies that $W_2$ is even. So $w_2=0$ and the manifold is spin (rather "spin-able"), which is what Wall calls "condition (H)". The other equations then impose further conditions on the allowed values of $p_1 \leftrightarrow n$. In particular we see that $n$ has to be a multiple of 4 and is congruent to 1 mod 3.
All of this comes from some observations about necessarly relations between these invariants. We haven't touched at all on the realization problem, i.e. which of the possible $n$ actually come from 6-manifolds?
Wall helps us there too. He gives a more careful analysis in the case of manifolds satisfying "condition (H)". In that case (his thm 5) diffeomorphism classes of manifolds correspond bijectively to systems of invariants $(H,G, p_1, \mu)$ as before subject to two relations
$$ \mu(x,x,y) \equiv \mu(x,y,y) \; \; \; \textrm{mod 2} \\
p_1(x) = 4 \mu(x,x,x) \; \; \; \textrm{mod 24}$$
Note that the final condition is stronger than the previous conditions. Some values of $n$ do not occur.
In the case at hand where $H = \mathbb{Z}$, $G=0$, and $\mu$ is the standard "3-fold product" trilinear map, the first equation is satisfied, and the second condition tells us that
$$ n = 4 + 24k $$
for some integer $k$.
Finally, Wall also tells us how to construct this manifold. It can be realized as surgery on a framed knot $S^3 \times D^3 \hookrightarrow S^6$. Specifically it is surgery on the framed knot with invariants $\varphi = -k$ and $\beta' = 1 + 6k$. These knot invariants are discussed at length in sections 4 and 5 of Wall's paper, which has other references.