This can come down to ultimately 2 answers, regarding playing Zombies for the economy.
1. Do you have XP Efficiency? You need XP Efficiency to earn XP (and by extension, level up).
To acquire the aforementioned Efficiency, you first need to have DP, which can be earned from most of the activities. Using your earned DP, you can spend it on XP Efficiency, at a rate of 1 XP Efficiency% for 10 DP. Note that as you have XP Efficiency, your DP will drain to sustain it. Once your DP is fully drained, your XP Efficiency will be drained next. Therefore, don’t spend all your DP on XP Efficiency, but instead try to at least keep 100 DP, and then keep grinding on the server for more DP, to continue to sustain your XP Efficiency or purchase more.
2. Are you playing on economy enabled maps?
The Mathematics of the Economy document/guide has details regarding earning DP and XP within the economy. The important thing to note is that not all Zombies maps can have DP and XP earned on them, for reasons such as the map being new and yet to receive economy multipliers that dictate DP and XP gain, or because a map is too easy. If a map does not have DP/XP multipliers, you will not be able to earn XP or DP on that map.