If you look at the specifications you will see that the output range for the GP2Y0A02 is about 0.5V to 2.75V. With a 5V analog input that's about 102 to 563. You might want to constrain the inputs before mapping:
int irVal = analogRead(irSensor);
int irMapVal = map(constrain(irVal,102,563), 102, 563, 0, 100);