How can I protect pine from yellowing?
The wood will change color eventually no matter what you do. However, you can do two things to slow down that process. 


Use a water-based polyurethane finish. All other finishes are either slightly yellow going on, or themselves yellow with age. 
Keep the sun off the wood. Sunlight hastens the darkening process. 
A dark stain will mask the effect. The darker the better.