You may need to extend both sides of the canvas to your desired dimensions (if the background is simple). For example, I extended this image to 2560x1440 (16:9). Different images may result in different outcomes.
If it’s a PSD file, you can remove the background and replace it with a new one, as shown in the example below.
(However, depending on the composition and complexity of each image, good results are not guaranteed.)