I would train both but for strictly building shoulder strength I would say strict military. Its more of a pure shoulder strength exercise. Strict military is pure shoulder and triceps.
The push press relies heavily on front squat or leg strength to get that bar moving. If you get a good push or drive it will carry you through the range of motion where the shoulders work the hardest. Thats why Glenn Pendlay's number one advice on the push press is to get your squat and front squat up.