The NEF files look normal when using windows photo viewer, but on the same monitor the JPEG that the camera has converted looks yellow. If I view the NEF on different software it looks yellow also.
This is probably a whitebalance problem. NEF or RAW files don't have a white balance setting yet. They are a recording of the data before any settings such as whitebalance are applied. If you load the NEF file in a viewer, it will make some assumption on what whitebalance to use, that is why it looks different in different programs.
Try opening the NEF file in Nikon View NX-i or Capture NX-i, they are both available for free on the Nikon site. These programs read the settings used in the camera, and will make the picture look yellow too. Then use the whitebalance slider to get the colors right.
The answer is probably simple. Either your computer monitor is uncalibrated or your camera screen is.
Here is a really old tutorial I made on how you can manually calibrate your monitor:
But several things can come into play, for example:
Are other images taken with different lenses ok?
Is the lens new? Is it clean?
Are the working conditions of the camera normal? (Not overheated for example)
Did you change your camera settings, did you perform a white balance test on your scene? Color issue: studio images have a pink hue
What are the values of the RGB file?
Does your "other image viewer" support color profiles?