Theres still alot of missing information here, so let me probe a bit.
First you should know that DEP is also a mechanism that can be enforced at the hardware level, trying to execute a shellcode on the stack regardless of whether youre using VirtualAlloc or not.
Also I didnt get a chance to see exactly what the shellcode is doing, but have you suspended the target process before trying to execute the shellcode? I can see issues with the current code youre using that may cause some undefined behavior, namely at the point at which the shellcode is trying to be executed via remoteThread.
Where is the shellcode being injected? Also try adding a check to see if the call to VirtualAllocEx even succeeded, it would be a shame if it didnt right?