To present evidence that red panda populations were becoming less diverse over time, you would want to measure how diversity changes in relation to the number of generations.
In this case, the correct identification of independent and dependent variables would be:
Independent = Generation and Dependent = Nucleotide Diversity
This choice indicates that you are examining how nucleotide diversity (which reflects genetic diversity) changes across different generations of red pandas.