Method 1:
(i) Expand the density operator in the Fock basis as $\rho=\sum_{m,n}{\rho_{mn}|m\rangle\langle n|}$.
(ii) Purity = $tr{\rho^2}=\sum_{m,n,f,g, \lambda}{\rho_{mn}\rho_{fg}\langle \lambda|m\rangle\langle n|f\rangle\langle g|\lambda\rangle}$
(iii) Three out of five sums vanish due to the inner products
(iv) Therefore, Purity = $\sum_{m,n}{\rho_{mn}\rho_{nm}}$
Method 2: This method uses the Wigner distributions of the Fock states. (Ref: What is the Wigner function of $|n\rangle\langle m|$?)
(i) Wigner distribution of the state can be written as $W = \sum_{m,n}{\rho_{mn} W_{nm}} $
(ii) Purity = $2\pi \int{W^2dq dp}= \sum_{m,n,f,g}\rho_{mn}\rho_{fg}2\pi\int{ W_{mn}W_{fg} dq dp}$
(iii) $2\pi\int{ W_{mn}W_{fg} dq dp} = \delta_{m,n,f,g} $ which collapses three out of four sums and causes a mismatch with respect to the result from method 1. This step must be incorrect, but I cannot determine the problem using the Wigner distributions.