It could be either a memory DIMM (itself) that has a problem, or…
… it could be the RAM SLOT that has the problem (both DIMMs are still ok).
Sometimes, removing the DIMMs, cleaning the contacts, replacing them may get things going again, but, if that doesn't work...
...The only way to find out is to do a step-by-step replacement.
Example:
- remove back, remove both DIMMs (be CAREFUL when you take them out, the tabs that hold them in the slots can break off from mishandling!)
- mark the DIMMs (example, "a" and "b")
- put DIMM A into the top slot, put the back on, put a few screws in to hold it in place, boot and run. Try the hardware test. Is it error-free?
- if so, swap out DIMM B for DIMM A, put back on, retest. What are the results?
Then move to the bottom slot and repeat the process.
Obviously, this involves some work. But you need to do a "process of elimination" to find out what's wrong.