PIC18F Internal reference
Your new PIC doesn't have the same set of voltage reference options which the old one does.
A quick scan through the ADC section of the new PIC's datasheet shows me that your reference options are:  

REGISTER 23-2: ADCON1: A/D CONTROL REGISTER 1
VCFG&lt;1:0&gt;: A/D VREF+ Configuration bits
11 = Internal VREF+ (4.096V)
10 = Internal VREF+ (2.048V)
01 = External VREF+
00 = AVDD


So no 1.024V option.