Without more detail it is hard to say exactly what is wrong, but there is a sensible order to work through, and the cheapest fixes come first.
Try having the transmission fluid flushed. It may well help. Kia transmissions from that era are not especially robust, and neglect early in a car's life tends to be expensive later — plenty of owners assume nothing needs doing, and then the transmission goes. My own preference would be a fluid and filter change before condemning the unit at all. Roughly eight times out of ten it is the transmission, but that leaves a meaningful chance you get lucky.
Here is the thing everyone forgets: every Kia of that generation has a shift lock button on the automatic shifter. Make sure the "HOLD" light is not illuminated, because that alone will change how the box behaves.
The transmission control module sits under the dash, just above the brake pedal, in a gold-coloured box. Confirm that nobody has accidentally half-unplugged it — a partially seated connector produces exactly this kind of intermittent, baffling fault.
If you do decide to pull that gold box out, disconnect the negative battery terminal first. And be aware of the cost: around $1,000 from Kia, about $100 from a junkyard. That price gap alone is a reason to be very sure before disturbing it.
Work through in that order — fluid and filter, shift lock, connector — and you may avoid a very large bill.