The range of a function is the complete set of all possible resulting values of the dependent variable (y, usually), after we have substituted the domain. In plain English, the definition means: The range is the resulting y-values we get after substituting all the possible x-values.
The on;y possible value for y is Y=6, so the answer is D