PIC16LF1786 change PWM pin on CCP3 with APFCON1
I don't use Proteus but here is an example that works in the MPLABX simulator:



This is the whole code:

/*
 * file: main.c
 * author: dan1138
 * target: PIC16F1786
 * compiler: XC8 v1.35
 * IDE: MPLABX v4.05
 * 
 * Description:
 *  Show PWM3 output on RB5 in MPLABX simulator.
 */
#pragma config FOSC = INTOSC, WDTE = OFF, PWRTE = OFF, MCLRE = ON
#pragma config CP = OFF, CPD = OFF, BOREN = OFF, CLKOUTEN = OFF
#pragma config IESO = ON, FCMEN = OFF
#pragma config WRT = OFF, VCAPEN = OFF, PLLEN = OFF, STVREN = ON
#pragma config BORV = LO, LPBOR = OFF, LVP = OFF

#include &lt;xc.h&gt;

/*
 * Define what we expect the system oscillator frequency will be.
 */
#define FOSC (32000000ul)
#define FCYC (FOSC/4ul)
/*
 * Initialize this PIC hardware
 */
void PIC_Init( void ) {
    /* disable global interrupt sources */
    INTCON =  0;

    /* select 8MHz internal oscillator*/
    OSCCONbits.IRCF = 0b1110;
    /* Enable PLL for a 32MHZ system clock */
    OSCCONbits.SPLLEN = 1;

    /* disable all interrupt sources */
    PIE1 = 0;
    PIE2 = 0;
    PIE3 = 0;
    PIE4 = 0;

    /* Make all GPIOs inputs */
    TRISA = 0xFF;
    TRISB = 0xFF;
    TRISC = 0xFF;
    TRISE = 0xFF;

    /* set OPTION_REG to defaults */
    OPTION_REG = 0xFF;
}
/*
 * Initialize PWM3 on RB5
 */
void PWM3_Init( void ) {
    PIE3bits.CCP3IE = 0;            /* Disable CCP3 interrupts */
    PIE1bits.TMR2IE = 0;            /* Disable TIMER2 interrupts */
    TRISBbits.TRISB5 = 1;           /* Tri-state PWM3 output */
    CCP3CON = 0;                    /* Disable PWM3 */
    T2CON = 0;                      /* Stop TIMER2  */
    APFCON2bits.CCP3SEL = 1;        /* Select RB5 for CCP3 output */
    T2CONbits.T2CKPS = 1;           /* Select TIMER2 prescale as 1:4 */
    PR2 = (FCYC/(4ul*20000ul))-1;
    CCP3CONbits.CCP3M = 0b1100;     /* enable PWM3 */
    CCPR3L = (PR2+1u)&gt;&gt;1u;          /* Set for 50% duty cycle */
    PIR1bits.TMR2IF = 0;
    T2CONbits.TMR2ON = 1;           /* Start PWM clock source */
    while(!PIR1bits.TMR2IF);        /* wait for PWM to cycle once */
    PIR1bits.TMR2IF = 0;
    TRISBbits.TRISB5 = 0;           /* Turn on PWM3 output */
}
/*
 * Main application
 */
void main( void ) {
    unsigned char PWM_cycle_count = 9;

    PIC_Init();
    PWM3_Init();
    /* Process loop */
    for(;;) {
        if(PWM_cycle_count) {
            if(PIR1bits.TMR2IF) {
                PWM_cycle_count--;
                PIR1bits.TMR2IF = 0;
            }
            if(PWM_cycle_count == 5) {
                CCPR3L = 0; /* set duty cycle tp 0% */
            }
        } else {
             NOP(); /* put simulator breakpoint here */
        }
    }
}


The MPLAB v8.92 simulator does not fully support the PIC16F1786 so the PWM output is on RC6 only. No settings in the APFCON1 or APFCON2 registers changes this.