Structure and Evolution of the Envelopes of Deeply Embedded Massive Young Stars