is there any chance you forgot to disable the analog converters?
ADCON1=7

PortA Doesn't Work & Common 8-Bit PIC® Microcontroller I/O Pin Issues
http://www.picbasic.co.uk/forum/showthread.php?t=561


If i remember correctly, PORTA.4 is an open-drain output, so the LED has to be connected between Vdd and PORTA.4

Pin RA4 doesn't work
http://www.picbasic.co.uk/forum/showthread.php?t=562