The best link with updated information on travel to Vieques is that available on this website: https://vieques.com/getting-here/ IF you are just 1 person, flying from San Juan is probably as economical as taking a ferry.
Once you are 2 or more, the ferry is most economical, although it may take you more time.
**When booking your flight to San Juan, check that you will land early enough to either a) connect to a local flight or b) reach the ferry in time at least for the last ferry on the schedule.
IF you cannot make an easy connection, you might consider spending a night in Old San Juan, giving yourself time to see the fort and walk the streets ...it is a small area, but charming. (There is also a hotel in the airport, if you prefer to stay there and fly out again as soon as possible.)