The CMB has a thermal black body spectrum at a temperature of 2.72548±0.00057 K. The spectral radiance $dE_\nu/d\nu$ peaks at 160.23 GHz. Alternatively, if spectral radiance is defined as $dE_\lambda/d\lambda$, then the peak wavelength is 1.063 mm (282 GHz).
The difference is in the definition of spectral radiance. Radiance per unit of frequency and radiance per unit of wavelength do not match, but happen in different parts of the spectrum.
See: Cosmic Microwave Background
According to Plank's law
$$E_\nu(T) = \frac{2h\nu^3}{c^2}\frac{1}{e^{\frac{h\nu}{kT}} - 1}$$
Differentiating by $\nu$ gives the peak of $dE_\nu/d\nu=0$ at
$$(3-x)e^x-3=0$$
that easily solves numerically for $x\equiv\dfrac{h\nu}{kT}=2.82143937$...
Using the constants
$$h=6.62607004\cdot 10^{-34}$$
$$k=1.3806485\cdot 10^{-23}$$
We get
$$\nu_{max}=T\cdot 58.789\,GHz$$
Which for $T=2.725\,K^o$ yields $\nu_{max}=160.23\,GHz$ at $\lambda=1.871\,mm$