We grew InAs quantum dots (QDs) embedded in a GaAs0982N0.018 quantum well—a dot-in-a-well (DWELL) structure—that exhibits emission at wavelengths of up to 1.31µm at 19K and the full width at half maximum (FWHM) of 59meV which are lower those of the InAs/GaAs QDs (1.09µm and 82meV, respectively), the reference sample. Our results can be explained as follows: modified strain field at the GaAsN matrix/InAs QDs due to insertion of ultrathin GaAsN matrix, or nitrogen-induced point defects formed in the ultrathin GaAsN matrix during growth, could promote the homogeneous distribution of InAs QDs on the surface. The GaAsN capping layer evidently enhances the emission wavelength by reducing the overall compressive strain within the QDs. DWELL with ultrathin matrix layer annealed at 800°C exhibited 130-fold improvement in PL intensity, as compared to the as-grown sample, attributed to annihilation of N-related point defects. The results of this study are expected to be useful in fabricating DWELL-based infrared photodetectors with narrow spectral linewidth.