I have the same problem with .Data.Pages and with hugo 0.18.1. My project is also not public. It’s strange that everything is fine in index.html but .Data.Pages is empty in a single.html file.
Edit: never mind, I think I just misunderstood something again. .Data.Pages is empty, but .Site.Pages works.