Why won't solder melt on copper pipe?
4 tips to soldering success.

Physically clean - for copper, that's a bright shiny light-pink
color, achieved through abrasive means. Even new fittings need to be cleaned - they are not shipped in oxygen-proof packaging.
Chemically clean - flux.
Hot enough to melt solder (the pipe, never apply the flame directly to the solder) - apply the flame to the joint and the solder to the joint away from the direct flame. When it starts to smear it's close.
But not too hot or you'll burn the flux and oxidize the copper, at which point you need to take it apart and start over from point 1.

You're almost certainly at point 4 now, if you were trying and failing to melt solder for a while.