I had been using a Nikon D3400 with aperture priority mode. I received a Nikon D750 as a present and am in the process of upgrading to FX format lenses. I am looking at a Nikon AF-S Nikkor 24-70mm f/2.8G ED lens, which has constant aperture. Can I still work in aperture priority mode with this lens?
Constant Aperture is a reference to a zoom lens' maximum aperture at all focal lengths.
It does not mean that it is the lens' only available aperture setting. That would be a fixed aperture lens.
It some ways it is easier to shoot in aperture priority exposure mode with a constant aperture zoom lens than with a variable aperture zoom lens.
(The following is applicable when using any Nikon digital camera with a Nikkor/Nikon lens, or third party lens in the Nikon F-mount, that does not have an aperture ring, such as the lens in question, the Nikkor AF-S 24-70mm f/2.8G. It is also the case if you are using an older Nikon or third party lens that does have an aperture ring but the camera body you are using requires the ring on the lens to be locked at the narrowest aperture setting.)
Let's say you are in a low light situation and you want to use the widest aperture at each focal length of a variable aperture 70-300mm f/4-5.6 lens. If you start out shooting at 300mm the widest you can set the aperture is f/5.6. When you zoom out to 70mm, the camera will preserve the f/5.6 aperture you selected at 300mm. You'll need to reset the aperture to f/4 while the zoom is set to 70mm. Then, when you zoom back in to 300mm the aperture will be forced back to f/5.6.
On the other hand, a constant aperture zoom lens allows the same maximum aperture at any focal length setting.
In manual exposure mode the advantage of a constant aperture lens is even more obvious. If you set the 70-300mm f/4-5.6 lens at f/4 with a shutter time of 1/250 second at 70mm, when you zoom in to 300mm, the aperture will be forced to change f/5.6, but the shutter time will not be automatically compensated and will remain at 1/250 instead of lengthening to 1/125 to preserve the same exposure value.
Usually, the f/2.8 notation just tells you the maximum aperture (greatest diameter), but it does not say anything about the smallest aperture (smallest diameter).
E.g. a 70-200 mm f/2.8 can keep its maximum aperture all the way from 70 mm to 200 mm, but you can always choose a smaller aperture, e.g. f/4 or f/11 (just two random examples - usually, you can choose them in the usual 1/3 steps)
Yet even if your lens has only a constant permanent aperture of f/2.8, you could still use aperture priority mode - it should still be able to change the shutter speed (and ISO, if your camera can do that) like it would with a non-permanent f/2.8 lens.
That said: I cannot rule out that some camera I have not yet heard of does block using aperture priority if it cannot detect the aperture value of the lens (which would make sense, as a lens that cannot change its aperture most likely would be a fully manual lens).
There are two misunderstandings in your question.
As covered already by Michael and flolilolilo, "constant aperture" means that the widest available aperture (smallest f-number) is constant across the zoom range; it doesn't mean that the lens can only shoot at f/2.8.
Suppose that you did have a hypothetical lens that could only shoot at f/2.8. Then you would be forced to use aperture-priority (or full-manual) mode. Remember that aperture-priority means that you choose the aperture and the camera chooses the shutter speed to give a correct exposure. With this hypothetical lens, your only option would be to choose f/2.8 and let the camera choose the exposure. You wouldn't be able to shoot shutter-priority (you choose the shutter speed and the camera chooses the aperture) because the camera would only be able to select the right aperture for one shutter speed (the one that gives the right exposure at f/2.8).
Frank points out in a comment that actually there are lenses that can only shoot at one fixed aperture: mirror lenses. They're rather rare, these days, and they'd typically have their aperture somewhere around f/8 or f/11.