Hello,
Well I have already managed to program the PIC18F4520 with the PICKIT3, I decided on this PIC because its pins correspond to the PIC I was using, the PIC16F877A, my surprise was that the UART does not work with my NEXTION screen, in the simulation in PIC SIMULATOR IDE the UART works fine. I have not modified delays, I do not know if I have to have any previous configuration with this PIC18F4520, since it is the first time I use this PIC, I have carried out code tests to verify that it is recorded correctly with the PICKIT3, but the UART has not been possible. I attach the files. Let's see if someone with more knowledge can help me.
Greetings.