Go look at COMPARATORS in the Datasheet (for example look at figure 12-1 to select bits 2-0 of the CMCON Register). Turn them OFF first setting those pins DIGITAL mode.

The go look at ADC's in your Datasheet (for example the Table associated with bits 3-0 of register ADCON1 as shown in 11-2). Set those to DIGITAL mode too.

Then go TRISx your Ports.

It is IMPORTANT that everyone READs THE DATASHEET of their chosen PIC to understand it's internal archetecture before blindly going and attempting to program it. Chances are, that with the more complicated PICs, it just isn't going to work until you understand and turn OFF all the things that might be standing in your way.