To present evidence that red panda populations were becoming less diverse over time, you would want to show how nucleotide diversity changes as the generations progress. In this case, the independent variable is the generation (since this is what is changed over time), and the dependent variable is the nucleotide diversity (since this is what is measured as a result).
Thus, the correct choice is:
Independent = Generation and Dependent = Nucleotide Diversity