Analog output doesn't work for just 2 LEDs [Arduino Mega]
Analog pins an only read analog values, not write them.

analogWrite() is a deceptive name. It should really be PWMWrite() since all it does is PWM. And that, of course, needs PWM pins.