Let $ n\left(A\right)$ be the number of distinct real solutions of the equation $ x^{6} \minus{}2x^{4} \plus{}x^{2} \equal{}A$. When $ A$ takes every value on real numbers, the set of values of $ n\left(A\right)$ is

$\textbf{(A)}\  \left\{0,1,2,3,4,5,6\right\} \\ \textbf{(B)}\  \left\{0,2,4,6\right\} \\ \textbf{(C)}\  \left\{0,3,4,6\right\} \\ \textbf{(D)}\  \left\{0,2,3,4,6\right\} \\ \textbf{(E)}\  \left\{0,2,3,4\right\}$
1. **Rewrite the given equation:**
   \[
   x^6 - 2x^4 + x^2 = A
   \]
   Factor the left-hand side:
   \[
   x^2(x^4 - 2x^2 + 1) = A
   \]
   Notice that \(x^4 - 2x^2 + 1\) can be factored further:
   \[
   x^4 - 2x^2 + 1 = (x^2 - 1)^2
   \]
   Therefore, the equation becomes:
   \[
   x^2(x^2 - 1)^2 = A
   \]

2. **Analyze the function \( f(x) = x^2(x^2 - 1)^2 \):**
   \[
   f(x) = x^2(x^2 - 1)^2
   \]
   This function is non-negative for all real \(x\) because it is a product of squares. The function has critical points where the derivative is zero or undefined.

3. **Find the critical points:**
   \[
   f'(x) = \frac{d}{dx} \left( x^2(x^2 - 1)^2 \right)
   \]
   Using the product rule and chain rule:
   \[
   f'(x) = 2x(x^2 - 1)^2 + x^2 \cdot 2(x^2 - 1) \cdot 2x
   \]
   Simplify:
   \[
   f'(x) = 2x(x^2 - 1)^2 + 4x^3(x^2 - 1)
   \]
   Factor out common terms:
   \[
   f'(x) = 2x(x^2 - 1) \left( (x^2 - 1) + 2x^2 \right)
   \]
   \[
   f'(x) = 2x(x^2 - 1) (3x^2 - 1)
   \]
   Set \( f'(x) = 0 \):
   \[
   2x(x^2 - 1)(3x^2 - 1) = 0
   \]
   This gives the critical points:
   \[
   x = 0, \quad x = \pm 1, \quad x = \pm \frac{1}{\sqrt{3}}
   \]

4. **Evaluate \( f(x) \) at the critical points:**
   \[
   f(0) = 0
   \]
   \[
   f(1) = 1^2(1^2 - 1)^2 = 0
   \]
   \[
   f\left( \frac{1}{\sqrt{3}} \right) = \left( \frac{1}{\sqrt{3}} \right)^2 \left( \left( \frac{1}{\sqrt{3}} \right)^2 - 1 \right)^2 = \frac{1}{3} \left( \frac{1}{3} - 1 \right)^2 = \frac{1}{3} \left( -\frac{2}{3} \right)^2 = \frac{1}{3} \cdot \frac{4}{9} = \frac{4}{27}
   \]

5. **Determine the range of \( f(x) \):**
   The function \( f(x) \) is non-negative and has a minimum value of 0 at \( x = 0 \) and \( x = \pm 1 \). The maximum value occurs at \( x = \pm \frac{1}{\sqrt{3}} \) and is \( \frac{4}{27} \).

6. **Analyze the number of solutions for different values of \( A \):**
   - For \( A < 0 \), there are no real solutions since \( f(x) \geq 0 \).
   - For \( A = 0 \), there are 3 solutions: \( x = 0, \pm 1 \).
   - For \( 0 < A < \frac{4}{27} \), there are 6 solutions because the function \( f(x) \) intersects the line \( y = A \) at 6 points.
   - For \( A = \frac{4}{27} \), there are 4 solutions because the function \( f(x) \) intersects the line \( y = \frac{4}{27} \) at 4 points.
   - For \( A > \frac{4}{27} \), there are 2 solutions because the function \( f(x) \) intersects the line \( y = A \) at 2 points.

7. **Conclusion:**
   The set of values of \( n(A) \) is \( \{0, 2, 3, 4, 6\} \).

The final answer is \( \boxed{D} \)