There can be a subtle difference.
If I were creating something, e.g. writing some new programming code; putting some electrical or mechanical components together to achieve a particular objective; installing and setting up a new TV set for the first time ; then, if unsuccessful, I might say "I didn't get it to work" or "I can't/couldn't get it to work" . (It had never worked, because it was new.)
If I were repairing something that had previously worked (e.g. repairing a previously working TV set ) and the repair was unsuccessful, then I would probably say "I didn't/can't/couldn't get it working". (It had previously worked.)
Note that these are subtle differences, and I do not mean to imply that the expressions and scenarios are necessarily always used that way around, not that it would be wrong to use them the other way around.
 Thanks to Janus Bahs Jacquet, whose comments contributed some examples and other input to my revised answer.