The ability to fine-tune the band gap of infrared (IR) detectors allows for multispectral imaging, which has many commercial military and civilian applications. However, conventional manufacturing methods are extremely limited in this field. This invention utilizes well-known and well-studied properties of dilute nitrides to utilize PV, nBn and XBn structures and their reduced working temperatures, to retain control over the bandgap energy of the III-V-N semiconductor active layer through control over its composition retaining the lattice-matching constraints. This laboratory proven method can pave the way for lattice-matched, compositionally tunable band gap active layers for infrared detectors with a cut-off wavelength between 3-5 microns or more.