The meaning of 了 before and after Object of Consecutive Actions
Please study Placement of 了: difference between 吃飯了 and 吃了飯

"了" in "我坐飞机去了上海。" is a verb particle that indicates the verb 去 is a completed action

"了" in "我坐飞机去上海了"  is a final particle that 1. indicate the sentence has ended 2. indicates the situation has changed 3. soften the tone/ add emphasis