How long can the distal joint on my finger be swollen for?

Many months. Assuming it was an injury, can take many months for swelling to go down from a tendon avulsion or fx. If it is painful should be xray'd to r/o a dislocation.
Depends on cause. Unfortunately this joint can stay swollen for a long time....Sometimes life. This depends on the cause - a sprained or jammed finger may stay swollen for a few weeks to months. Some arthritis or broken bones can cause this joint to stay swollen forever.