I read another post here where the dealer fixed it by replacing the fuel door housing for $280. That part is about $45 on Amazon, but the picture there shows the sensor, and it's pretty easy to get to. It is a cheap microswitch with a flimsy sheet metal actuator.
You can reach it with your finger, it's on the side of the housing behind the hinge (see photos). Exercise it a bit if it's stuck, or bend the actuator a bit to help it contact the hinge. Worked for me. The error code P04B6 went away, and the "Ready to Refuel" message goes away when I close the fuel door now.