A whining noise from the right front of your 1998 Chevy Blazer that stops when you engage 4WD strongly suggests a problem with the
front right wheel bearing. The reason it stops in 4WD is because the extra load and engagement of the front differential might slightly shift the weight and/or change the stress on the bearing, temporarily relieving the whining. However, this doesn't mean the bearing is magically fixed; it's likely still damaged and needs attention.
While other components *could* contribute to a whining sound, the correlation with 4WD engagement makes a wheel bearing the most likely culprit. Ignoring it will likely lead to further damage, potentially causing a complete bearing failure and resulting in a loss of control of the vehicle.
It's crucial to have a mechanic inspect this as soon as possible. Driving with a bad wheel bearing is dangerous.