It depends on the context really. Both expressions mean that some decision/outcome depends on something else.
Kommt darauf an is often used as a standalone expression in spoken language.
Gehst Du mit ins Kino?
Kommt darauf an. Meine kleine Schwester ist krank. Wenn ich mich angesteckt habe, dann nicht.
I don't know of any general rule when which is used, but it is clear that each requires a different sentence structure to be valid.
Often, je nach carries the connotation that there is more than one choice, and the number is not explicitly stated, while es kommt darauf an explicitly talks about the choices that are possible, even if it is an "all or nothing".
Example:
je nach Reiseziel => There is an unspecified number of possible locations
Kommt darauf an, ob ich verreise oder nicht => I may travel or not.
That said, it is also possible to say
Kommt auf das Reiseziel an.
Which is then equivalent to je nach Reiseziel, but it can be used as a sentence, while je nach Reiseziel is incomplete.