A spectral projection method for transmission eigenvalues