It's all about it's associated Channel number.
PortB.0.= AN0 = Channel 0 = ADCIN 0, bVar
PortB.7 = AN6 = Channel 6 = ADCIN 6, bVar
PBP manual:
ADCIN
ADCIN Channel,Var
Read the on-chip analog to digital converter Channel and store the result in Var. While the ADC registers can be accessed directly, ADCIN makes the process a little easier
Manual Really said Channel... not pin name.
Further details, open the datasheet, and see how you manually implement it... you also select/assign a channel number to the PIC register, not a pin name.
hth
Bookmarks