Soldier class, with health points
The short answer is yes, you succeeded in implementing encapsulation 100% correctly.

Still, I have some smaller problems with your code:

Useless method

I noticed that you have a setter method for the Variable solHealth, which you should rename in my opinion to health. The problem is that the setter is useless as the method has the private access modifier and this method should never be used by the class itself. The only thing that you need to change when deleting this method is that you would have to change the constructor to be like this:

public Soldier() {
    solHealth = 100;
}


This would still follow the concept of encapsulation, as encapsulation is simply a process of wrapping code and data together into a single unit, that allows only minimal manipulation from outer classes.

Comments

If you are commenting your code you can easily implement documentation comments with which you can create JavaDoc pages. This is the standard of how to document methods, classes, and global variables/constants.

Example

/**
 * Set's the soldiers health to the specified value
 *
 * @param health
 */
public void setHealth(int health) {
    // Code here
}