Light fixture wiring issue
New junction box, eh?  First, reinstall all cables in the junction box.  

That trick with the ground wire wrapped around the sheath appears to be using the cable clamp to ground to the metal box.  Note the metal box will have a #10-32 tapped hole intended for a ground screw, and you can put a pigtail on that to ground anything else. 

Now, identify which cable goes to the switch.   Mark its white wire with black tape, and its black wire with red tape. 

Also mark the black wire from the new lamp with red tape. 

Now you join similar colors: red to red, black to black, white to white, bare/green to bare/green.