RAW, Lightning Bolt only immediately damages creatures.
Spells (or portions of spell effects) that are explicit about affecting creatures mean that, by default, non-creatures are not affected by those portions of the spell.
As you quote, the portion of Lightning Bolt that causes immediate lightning damage only does so to creatures in its line of effect; they make a save, and the amount of damage is based on the save. Since the ship is not a creature, this entire section doesn't apply to it; it doesn't make a save, nor does it take any portion of the 8d6 lightning damage.
However, the ship is still potentially set ablaze as per the next part of the spell:
The lightning ignites flammable objects in the area that aren’t being worn or carried.
This is not tied to the above section about making a saving throw and simply happens to any applicable objects within the Lightning Bolt's area, no save required. As such, so long as the ship is considered flammable (and unworn and uncarried), it should simply catch fire wherever the Lightning Bolt's area of effect overlaps with it.
(Do note that it may not be considered flammable, depending on its condition; wet material doesn't burn easily.)
That said, I recommend talking to your DM about the specifics of how this works in their campaign; it is not at all uncommon for DMs to allow "creature-only" spells to affect objects in some way. In addition, it's not uncommon for DMs with specific campaign themes (such as being aboard ships for the majority of it) to have specific rules for what works, how it works, and what doesn't work when interacting with them in order to avoid situations where, say, a common spell is an instant ship destroyer.
In regards to whether or not you can aim the Lightning Bolt to attack the sails in the first place, Area of Effect spells like Lightning Bolt, Fireball, etc. generally don't care whether or not an affectable target is present within them; you're free to place them wherever you like, regardless of whether or not there's anything to affect in the target area. Single target spells, on the other hand, get a bit weirder.
"Magic Weapon Level" is not a thing
Unlike previous systems, there is no requirement that a magic weapon have a +1 minimum bonus of any kind. The Magic Weapon spell does give a +1 bonus, but magic items can have other bonuses. Flipping randomly through the DMG, I see that the Frost Brand (DMG 171) gives a bonus to damage but does not have an inherent +1 to attack and damage rolls, for example.
Therefore, once you use your Javelin of Lightning's special ability, it is a javelin with no bonuses to attack rolls and damage.
"Magic Weapon" is an inherent, meaningful property on its own
A javelin that is magic but doesn't give any bonuses is still useful, however. For example, the Lich (MM 202) is immune to
bludgeoning, piercing, and slashing from nonmagical weapons
But has no resistance to magic weapons. Therefore, you can use your javelin to deal normal damage to a Lich, where an non-magical javelin would deal no damage.
Many high-level monsters have this property, so having a weapon like this is not (totally) useless.
Best Answer
"Make a Ranged Weapon Attack" does not imply a particular attribute. A javelin thrown with strength is still a "Ranged Weapon Attack". The Thrown property tells you what stat to use.
As odd as it may seem, a Javelin is actually a simple melee weapon according to p149 of the PHB. That means you use Strength. It does not have the Finesse property, so you may not use Dexterity.
The type of save required by the lightning bolt effect has no bearing on how the javelin itself is thrown. If it did, it would say so. It is worth noting that the target doesn't make a save - the wielder and the target are specifically excluded. The target takes the lightning damage on a hit.