You are welcome, I hope it is helpful.
I changed the word loop to mainloop as loop is a reserved word in PBP 3.xx
notice ADCON0
bits 2 & 3 select the channel, bit 0 turns the AD on off and bit 1 is the GO/Done bit set to go, 0 means done which means you can check it to see if done.