Owing to the photonic band gap effect and defect state effect, photonic metamaterials have received much attention in the design of narrow bandpass filters, which are the key devices of optical communication equipment such as wavelength division multiplexing devices. In this work, based on zero-index metamaterial (ZIM), a compact filter with both high peak transmission coefficient and ultra-narrow bandwidth is proposed. The photonic metamaterial with conical dispersion and Dirac-like point is achieved by optimizing the structure and material component parameters of dielectric rods with square lattice in air. It is demonstrated that a triply degenerate state can be realized at the Dirac-like point, which relates this metamaterial to a zero-index medium with effective permittivity and permeability equal to zero simultaneously. Electromagnetic (EM) wave can propagate without any phase delay at this frequency, and strong dispersion occurs in the adjacent frequency cone, leading to dramatic changes in optical properties. We introduce a ZIM into photonic metamaterial defect filter to compress the bandwidth to the realization of ultra-narrow bandpass filter. The ZIM is embedded into the resonant cavity of line defect filter, which is also composed of dielectric rods with square lattice in air. In order to increase the sensitivity of the phase change with frequency, the Dirac-like frequency is adjusted to match the resonant frequency of the filter. We study the transmission spectrum of the structure through the COMSOL Multiphysics simulation software, and find that the peak width at half-maximum of the filter decreases as the thickness of ZIM increases, and the peak transmittance is still high when bandwidth is greatly compressed. The zero phase delay inside the slab can be observed. Through field distribution analysis, the zero-phase delay and strong coupling characteristics of electromagnetic field are observed at peak frequency. The comparison with conventional photonic metamaterials filter is discussed. We believe that this work is helpful in investigating the realization of ultra-narrow bandpass filters.