You need to install a 64 bit OS again. The 32 bit OS is causing the RAM restriction.
^This, assuming you have a 64-bit CPU.
In the INTEL/AMD CPU Universe:
A 32-bit CPU has 32 bits of address space, each location being 32 bits wide. This gives you a maximum address range of
2^32, or
4,294,967,296 bytes (4GB). Software written for such a CPU, including OSes (Windows) and Apps (Java) are by default limited to the same constraints.
On top of that, for system management reasons Windows is further limited to 3GB, although with some obscure tweakage you can come closer to having 4GB.
A 64-bit CPU has 64 bits of address space, each location being 64 bits wide. This gives you a maximum address range of
2^64, or
18,446,744,703,709,551,616 byte (18,446,744 GB)! To complicate things, a 64 bit CPU can still run 32-bit software, in a kind of Emulation mode, but you will see all the limitations of 32 bits because those were the boundaries when the software was written.
Granted, you can't currently build a 64-bit system with a full complement of ram but it's nice to know there's at least a tiny bit of room to grow into, even if Microsoft doesn't support that much ram yet (Windows 10 home supports 128GB, Pro supports 2TB)
As far as Minecraft is concerned, there's still Java's internal "Garbage collection" to deal with, and when running Minecraft it pukes all over itself with more than about 6GB allocated.