I've never used any of the 18 series PIC's, but on the 16 series there are strict limitations on the analogue inputs - these are clearly explained in the datasheet, so presumably will be so in the 18 series datasheets. I suggest you read the datasheet, which will explain how to select analogue and digital inputs and the restrictions involved,