Is there a temperature difference from a ground floor apartment to a top floor apartment, in a 30-story building?

Yes and no.

If you had a simple structure 300 feet tall and completely hollow. The thermal energy from the exterior (sunlight, air temperature, …) would heat the column of air and distribute it so that the heated air would move upwards leaving the cooler air below. Depending on humidity and thermal conductivity of the structure would determine what happens to the air at the top (rain, cooling, …).

But I think you are referring to a modern 30 story building.

We go to great lengths to environmentally control each part of the building to the level desired by the occupant, so the temperature can be arbitrary within human comfort temperatures.

So, is it hotter or colder at any level; depends on the occupants. If there more thermal energy present at certain areas such as the top versus the bottom; yes.