There can be a difference from top to bottom, especially when taking the first reading. If you're adding in plain water to bring you up to your batch size and don't mix the wort enough there can be a big difference from top to bottom and it isn't uncommon to see readings off by 10 points or more. This usually isn't as much of an issue after fermentation is complete since the yeast churn the beer up good.
That being said, if your beer is at or near room temp right now and you're still getting a reading in the 1.040 range, that is not right and would indicate the beer is simply not done fermenting yet, or there was a problem that prevented the fermentation from being complete.
Even though you may not have accurately been able to get a starting gravity reading, most beers, wheat included, should get down to the 1.010-1.015 range for a final gravity. You may want to take another reading in a day or two and see if it has changed.