How to move a junction box?
I hesitate to give this information but you can use an approved splice kit in a wall per the requirements of NEC 334.40(B). It looks like this:



The reason I hesitate is because somewhere around 85% of all electrical problems are caused by splices. Every good electrician knows this. That's why we always try to enclose any splice and make it available for maintenance purposes. Also keep in mind that the NEC is a minimum standard and at one time approved Aluminum branch wiring. Meaning they may think it is a bad idea in the future and write it out. 

So your best bet would be to find a way to run new conductors to a better location and protect it and make it accessible for maintenance.

By know you have probably guessed that I don't like them. I never had to use them. Granted it is more labor intensive and cost more, but it can be done. FYI if you will google in-line splices you will also find several sites that agree with my dislike.

Good Luck.