The effect of position‐dependent dielectric constant on the electric field and charge density in a p‐n junction