質問のタイトルに記載されているタイプのリストであると仮定すると、swapArray次のように値を交換する必要があります
swapArray.set(location1, tempswap2); // Set the location1 with value2
swapArray.set(location2, tempswap1); // Set the location2 with value1
エラーの原因はswapArray.set(location1)=tempswap2;. 左側はset()値を返すメソッド call( ) で、値に別の値を代入しようとしていますが、これは不正です。代入演算子の LHS に変数が必要です。
また、これは実際のメソッド シグネチャである必要があります。
public static void swap(List<Integer> swapArray, int location1, int location2)
^^^^^^^^^^^^^ - This is the type of the object you're passing. You needn't give the name of that object as such.
補足:入力ミスや構文エラーが発生しやすいため、コードを手動でここに入力するのではなく、常に IDE からコードをコピーして貼り付けることを忘れないでください。