To present evidence that red panda populations are becoming less diverse over time, you would want to show how nucleotide diversity changes as generations progress. The independent variable is what you manipulate or control in your study, which in this case is the generation number. The dependent variable is what you measure in response to changes in the independent variable, which in this case is nucleotide diversity.
Therefore, the correct choice would be:
Independent = Generation and Dependent = Nucleotide Diversity.