The PIC18F4550's internal oscillator pegs out a 8 MHz. To use a delay routine calibrated for 20 MHz, you'll have to use an external oscillator. So you will either have to write a routine for 8 MHz or setup an external oscillator.
Section 2 of the datasheet describes the function and setup of the clock, including how to configure the chip for an external oscillator.