For the following sentence:
I haven't been there in a long time.
I want to know if the above sentence conveys any connection with time up to now. How can I correct this sentence it if it is incorrect?
There's a lot going on with this question, and with the sentence it presents for analysis.
First, being there isn't an action, and neither is not being there. So ignore that definition; it's obviously wrong. (BTW, it's not "present perfect tense" either -- English only has two tenses, Present and Past).
Second, there are four senses of the Perfect construction, which are elucidated here. This is Type 3, the Stative/Resultative sense, used to indicate that the direct effect of a past event still continues. In this case the past event is the speaker's leaving, a long time ago, and the direct effect of that event is the speaker's present absence.
Third, in a long time, like in weeks or in ages, is a Negative Polarity Item (NPI), i.e, it's only grammatical inside the scope of a Negative. So (2), without a negative, is ungrammatical:
What's being asserted in (1) is that the state of the speaker's absence continues to the present from its inception a long time ago, or weeks ago, or "ages" ago. Affirmative ways do exist to say (2):
but they use for
The sentence implies that you have been there some time in the past, only not recently, if that is what you mean by "connection with time up to now".
You don't need to change anything in your sentence coz the Present Perfect (Have P.P.), by nature, is usually connected to the Present ("true until now")
Granted there might be some issues if you were making a positive sentence:
I have talked to him. (finished action with present effect)
I have been talking to him. (continuing action until now)
But especially if you're making a negative sentence:
I haven't talked to him. (until now)
I have never talked to him. (until now)
I haven't been talking to him. (until now)
I haven't been there in a while/ in a long time. (until now)
One point not properly brought out yet is that "I haven't been there for a long time* means that though you have visited the place, it was some time ago. However, "I haven't been here for a long time" means that you are at the spot now (since that's what here means), but arrived recently.