An Alberta judge has ruled that a war crimes sentence for former Guantanamo Bay prisoner Omar Khadr has expired.